Libretro: Do not allow opposing directions

This commit is contained in:
retro-wertz 2018-06-13 21:19:59 +08:00
parent 2c46522e59
commit 319a4869c7
1 changed files with 6 additions and 0 deletions

View File

@ -914,6 +914,12 @@ uint32_t systemReadJoypad(int which)
J |= input_cb(which, RETRO_DEVICE_JOYPAD, 0, binds[i]) << i;
}
// Do not allow opposing directions
if ((J & 0x30) == 0x30)
J &= ~(0x30);
else if ((J & 0xC0) == 0xC0)
J &= ~(0xC0);
return J;
}