all repos — mgba @ 6451aeaefc7c2d46861fa2794c7b6abc0e086c1f

mGBA Game Boy Advance Emulator

Support normal mode drivers
Jeffrey Pfau jeffrey@endrift.com
Sat, 08 Feb 2014 03:23:05 -0800
commit

6451aeaefc7c2d46861fa2794c7b6abc0e086c1f

parent

764b3fce10c6efe989c5107f249e880cebef26d8

2 files changed, 8 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-sio.csrc/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.hsrc/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; };