mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-01 12:12:46 +02:00
Forbid pressing two opposing direction keys. Fixes Pocket Bomberman (U).
This commit is contained in:
@@ -22,6 +22,13 @@ void GB_update_joyp(GB_gameboy_t *gb)
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
gb->io_registers[GB_IO_JOYP] |= (!gb->keys[i]) << i;
|
||||
}
|
||||
/* Forbid pressing two opposing keys, this breaks a lot of games; even if it's somewhat possible. */
|
||||
if (!(gb->io_registers[GB_IO_JOYP] & 1)) {
|
||||
gb->io_registers[GB_IO_JOYP] |= 2;
|
||||
}
|
||||
if (!(gb->io_registers[GB_IO_JOYP] & 4)) {
|
||||
gb->io_registers[GB_IO_JOYP] |= 8;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
Reference in New Issue
Block a user