GBA SIO: Only set up GBP driver if no other driver is loaded

This commit is contained in:
Vicki Pfau 2024-09-13 01:13:48 -07:00
parent 1d584edb77
commit 39d90e5e44
1 changed files with 3 additions and 2 deletions

View File

@ -87,9 +87,10 @@ void GBASIOPlayerUpdate(struct GBA* gba) {
gba->sio.gbp.inputsPosted = 0;
gba->sio.gbp.oldCallback = gba->keyCallback;
gba->keyCallback = &gba->sio.gbp.callback.d;
// TODO: Check if the SIO driver is actually used first
if (!gba->sio.driver) {
GBASIOSetDriver(&gba->sio, &gba->sio.gbp.d);
}
}
}
uint16_t _gbpRead(struct mKeyCallback* callback) {