Support normal mode drivers
Jeffrey Pfau jeffrey@endrift.com
Sat, 08 Feb 2014 03:23:05 -0800
2 files changed,
8 insertions(+),
0 deletions(-)
M
src/gba/gba-sio.c
→
src/gba/gba-sio.c
@@ -6,6 +6,9 @@ #include <limits.h>
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 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;
M
src/gba/gba-sio.h
→
src/gba/gba-sio.h
@@ -30,6 +30,7 @@ int32_t (*processEvents)(struct GBASIODriver* driver, int32_t cycles);
}; struct GBASIODriverSet { + struct GBASIODriver* normal; struct GBASIODriver* multiplayer; struct GBASIODriver* joybus; };