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,8 +87,9 @@ 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
GBASIOSetDriver(&gba->sio, &gba->sio.gbp.d);
if (!gba->sio.driver) {
GBASIOSetDriver(&gba->sio, &gba->sio.gbp.d);
}
}
}