mirror of https://github.com/PCSX2/pcsx2.git
onepad: fix a bug to handle multiple button (fix #1271)
zzogl: fix memory leak (fix #1431, #1432) GSdx ogl: disable geometry shader on Nvidia/Windows (I will wait a 3rd implementation to find which one is correct) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5724 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3aa0f374d4
commit
452cf72ddf
|
@ -193,12 +193,10 @@ namespace GLLoader {
|
||||||
fprintf(stderr, "Geometry shaders are not supported. Required openGL 3.2\n");
|
fprintf(stderr, "Geometry shaders are not supported. Required openGL 3.2\n");
|
||||||
found_geometry_shader = false;
|
found_geometry_shader = false;
|
||||||
}
|
}
|
||||||
#ifdef _LINUX
|
|
||||||
if (nvidia_buggy_driver) {
|
if (nvidia_buggy_driver) {
|
||||||
fprintf(stderr, "Buggy driver detected. Geometry shaders will be disabled\n");
|
fprintf(stderr, "Buggy driver detected. Geometry shaders will be disabled\n");
|
||||||
found_geometry_shader = false;
|
found_geometry_shader = false;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (theApp.GetConfig("override_geometry_shader", -1) != -1) {
|
if (theApp.GetConfig("override_geometry_shader", -1) != -1) {
|
||||||
found_geometry_shader = !!theApp.GetConfig("override_geometry_shader", -1);
|
found_geometry_shader = !!theApp.GetConfig("override_geometry_shader", -1);
|
||||||
fprintf(stderr, "Override geometry shaders detection\n");
|
fprintf(stderr, "Override geometry shaders detection\n");
|
||||||
|
|
|
@ -382,77 +382,33 @@ u8 _PADpoll(u8 value)
|
||||||
else
|
else
|
||||||
cmdLen = 4;
|
cmdLen = 4;
|
||||||
|
|
||||||
|
// Square
|
||||||
|
stdpar[curPad][15] = !test_bit(stdpar[curPad][3], 7) ? key_status->get(curPad, PAD_SQUARE) : 0;
|
||||||
|
// X
|
||||||
|
stdpar[curPad][14] = !test_bit(stdpar[curPad][3], 6) ? key_status->get(curPad, PAD_CROSS) : 0;
|
||||||
|
// Circle
|
||||||
|
stdpar[curPad][13] = !test_bit(stdpar[curPad][3], 5) ? key_status->get(curPad, PAD_CIRCLE) : 0;
|
||||||
|
// Triangle
|
||||||
|
stdpar[curPad][12] = !test_bit(stdpar[curPad][3], 4) ? key_status->get(curPad, PAD_TRIANGLE) : 0;
|
||||||
|
// R1
|
||||||
|
stdpar[curPad][17] = !test_bit(stdpar[curPad][3], 3) ? key_status->get(curPad, PAD_R1) : 0;
|
||||||
|
// L1
|
||||||
|
stdpar[curPad][16] = !test_bit(stdpar[curPad][3], 2) ? key_status->get(curPad, PAD_L1) : 0;
|
||||||
|
// R2
|
||||||
|
stdpar[curPad][19] = !test_bit(stdpar[curPad][3], 1) ? key_status->get(curPad, PAD_R2) : 0;
|
||||||
|
// L2
|
||||||
|
stdpar[curPad][18] = !test_bit(stdpar[curPad][3], 0) ? key_status->get(curPad, PAD_L2) : 0;
|
||||||
|
|
||||||
button_check = stdpar[curPad][2] >> 4;
|
button_check = stdpar[curPad][2] >> 4;
|
||||||
switch (stdpar[curPad][3])
|
// LEFT
|
||||||
{
|
stdpar[curPad][9] = !test_bit(button_check, 3) ? key_status->get(curPad, PAD_LEFT) : 0;
|
||||||
case 0xBF: // X
|
// DOWN
|
||||||
stdpar[curPad][14] = key_status->get(curPad, PAD_CROSS);
|
stdpar[curPad][11] = !test_bit(button_check, 2) ? key_status->get(curPad, PAD_DOWN) : 0;
|
||||||
break;
|
// RIGHT
|
||||||
|
stdpar[curPad][8] = !test_bit(button_check, 1) ? key_status->get(curPad, PAD_RIGHT) : 0;
|
||||||
|
// UP
|
||||||
|
stdpar[curPad][10] = !test_bit(button_check, 0) ? key_status->get(curPad, PAD_UP) : 0;
|
||||||
|
|
||||||
case 0xDF: // Circle
|
|
||||||
stdpar[curPad][13] = key_status->get(curPad, PAD_CIRCLE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xEF: // Triangle
|
|
||||||
stdpar[curPad][12] = key_status->get(curPad, PAD_TRIANGLE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x7F: // Square
|
|
||||||
stdpar[curPad][15] = key_status->get(curPad, PAD_SQUARE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xFB: // L1
|
|
||||||
stdpar[curPad][16] = key_status->get(curPad, PAD_L1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xF7: // R1
|
|
||||||
stdpar[curPad][17] = key_status->get(curPad, PAD_R1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xFE: // L2
|
|
||||||
stdpar[curPad][18] = key_status->get(curPad, PAD_L2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xFD: // R2
|
|
||||||
stdpar[curPad][19] = key_status->get(curPad, PAD_R2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
stdpar[curPad][14] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][13] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][12] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][15] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][16] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][17] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][18] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][19] = 0x00; // Not pressed
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch (button_check)
|
|
||||||
{
|
|
||||||
case 0xE: // UP
|
|
||||||
stdpar[curPad][10] = key_status->get(curPad, PAD_UP);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xB: // DOWN
|
|
||||||
stdpar[curPad][11] =key_status->get(curPad, PAD_DOWN);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x7: // LEFT
|
|
||||||
stdpar[curPad][9] = key_status->get(curPad, PAD_LEFT);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xD: // RIGHT
|
|
||||||
stdpar[curPad][8] = key_status->get(curPad, PAD_RIGHT);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
stdpar[curPad][8] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][9] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][10] = 0x00; // Not pressed
|
|
||||||
stdpar[curPad][11] = 0x00; // Not pressed
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
buf = stdpar[curPad];
|
buf = stdpar[curPad];
|
||||||
|
|
||||||
// FIXME FEEDBACK. Set effect here
|
// FIXME FEEDBACK. Set effect here
|
||||||
|
|
|
@ -246,7 +246,7 @@ bool SaveJPEG(const char* filename, int image_width, int image_height, const voi
|
||||||
/* This is an important step since it will release a good deal of memory. */
|
/* This is an important step since it will release a good deal of memory. */
|
||||||
jpeg_destroy_compress(&cinfo);
|
jpeg_destroy_compress(&cinfo);
|
||||||
|
|
||||||
delete image_buffer;
|
delete []image_buffer;
|
||||||
|
|
||||||
/* And we're done! */
|
/* And we're done! */
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -259,7 +259,7 @@ bool SaveJPEG(const char* filename, int image_width, int image_height, const voi
|
||||||
/* This is an important step since it will release a good deal of memory. */
|
/* This is an important step since it will release a good deal of memory. */
|
||||||
jpeg_destroy_compress(&cinfo);
|
jpeg_destroy_compress(&cinfo);
|
||||||
|
|
||||||
delete image_buffer;
|
delete []image_buffer;
|
||||||
|
|
||||||
/* And we're done! */
|
/* And we're done! */
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue