fix bug with P2 snespad getting its input ORed with P1 (and reduce noise)

This commit is contained in:
zeromus 2016-04-01 22:00:42 +00:00
parent a4fecfa67b
commit 7d49d00616
1 changed files with 2 additions and 1 deletions

View File

@ -256,11 +256,12 @@ void UpdateGamepad(bool snes)
int wgs = wg; int wgs = wg;
if(snes) if(snes)
{ {
JS = 0;
wgs = 0; wgs = 0;
for(int x=0;x<12;x++) for(int x=0;x<12;x++)
if(DTestButton(&GamePadConfig[wg][x])) if(DTestButton(&GamePadConfig[wg][x]))
JS|=(1<<x)<<(wgs<<3); JS|=(1<<x)<<(wgs<<3);
printf("%d %d\n",wg,JS); //printf("%d %d\n",wg,JS); //useful debugging
} }
else else
{ {