mirror of https://github.com/mgba-emu/mgba.git
GBA IO: Fix regression breaking keyCallbacks
This commit is contained in:
parent
03d85b44d2
commit
32a515ee7f
|
@ -723,8 +723,7 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
|||
GBATimerUpdateRegister(gba, 3, 2);
|
||||
break;
|
||||
|
||||
case REG_KEYINPUT:
|
||||
{
|
||||
case REG_KEYINPUT: {
|
||||
size_t c;
|
||||
for (c = 0; c < mCoreCallbacksListSize(&gba->coreCallbacks); ++c) {
|
||||
struct mCoreCallbacks* callbacks = mCoreCallbacksListGetPointer(&gba->coreCallbacks, c);
|
||||
|
@ -732,7 +731,6 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
|||
callbacks->keysRead(callbacks->context);
|
||||
}
|
||||
}
|
||||
}
|
||||
uint16_t input = 0;
|
||||
if (gba->keyCallback) {
|
||||
input = gba->keyCallback->readKeys(gba->keyCallback);
|
||||
|
@ -752,9 +750,9 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
|||
input |= ud;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0x3FF ^ input;
|
||||
}
|
||||
|
||||
case REG_SIOCNT:
|
||||
return gba->sio.siocnt;
|
||||
case REG_RCNT:
|
||||
|
|
Loading…
Reference in New Issue