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:
gregory.hainaut 2013-08-25 12:11:32 +00:00
parent 3aa0f374d4
commit 452cf72ddf
4 changed files with 27 additions and 73 deletions

View File

@ -193,12 +193,10 @@ namespace GLLoader {
fprintf(stderr, "Geometry shaders are not supported. Required openGL 3.2\n");
found_geometry_shader = false;
}
#ifdef _LINUX
if (nvidia_buggy_driver) {
fprintf(stderr, "Buggy driver detected. Geometry shaders will be disabled\n");
found_geometry_shader = false;
}
#endif
if (theApp.GetConfig("override_geometry_shader", -1) != -1) {
found_geometry_shader = !!theApp.GetConfig("override_geometry_shader", -1);
fprintf(stderr, "Override geometry shaders detection\n");

View File

@ -382,77 +382,33 @@ u8 _PADpoll(u8 value)
else
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;
switch (stdpar[curPad][3])
{
case 0xBF: // X
stdpar[curPad][14] = key_status->get(curPad, PAD_CROSS);
break;
// LEFT
stdpar[curPad][9] = !test_bit(button_check, 3) ? key_status->get(curPad, PAD_LEFT) : 0;
// DOWN
stdpar[curPad][11] = !test_bit(button_check, 2) ? key_status->get(curPad, PAD_DOWN) : 0;
// 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];
// FIXME FEEDBACK. Set effect here

View File

@ -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. */
jpeg_destroy_compress(&cinfo);
delete image_buffer;
delete []image_buffer;
/* And we're done! */
return true;

View File

@ -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. */
jpeg_destroy_compress(&cinfo);
delete image_buffer;
delete []image_buffer;
/* And we're done! */
return true;