From 6451aeaefc7c2d46861fa2794c7b6abc0e086c1f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 8 Feb 2014 03:23:05 -0800 Subject: [PATCH] Support normal mode drivers --- src/gba/gba-sio.c | 7 +++++++ src/gba/gba-sio.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gba/gba-sio.c b/src/gba/gba-sio.c index 03df23785..4eab4e9ba 100644 --- a/src/gba/gba-sio.c +++ b/src/gba/gba-sio.c @@ -6,6 +6,9 @@ static struct GBASIODriver* _lookupDriver(struct GBASIO* sio, enum GBASIOMode mode) { switch (mode) { + case SIO_NORMAL_8: + case SIO_NORMAL_32: + return sio->drivers.normal; case SIO_MULTI: return sio->drivers.multiplayer; case SIO_JOYBUS: @@ -61,6 +64,10 @@ void GBASIOSetDriverSet(struct GBASIO* sio, struct GBASIODriverSet* drivers) { void GBASIOSetDriver(struct GBASIO* sio, struct GBASIODriver* driver, enum GBASIOMode mode) { struct GBASIODriver** driverLoc; switch (mode) { + case SIO_NORMAL_8: + case SIO_NORMAL_32: + driverLoc = &sio->drivers.normal; + break; case SIO_MULTI: driverLoc = &sio->drivers.multiplayer; break; diff --git a/src/gba/gba-sio.h b/src/gba/gba-sio.h index 6ada65f9c..7a8f57c49 100644 --- a/src/gba/gba-sio.h +++ b/src/gba/gba-sio.h @@ -30,6 +30,7 @@ struct GBASIODriver { }; struct GBASIODriverSet { + struct GBASIODriver* normal; struct GBASIODriver* multiplayer; struct GBASIODriver* joybus; };