Support normal mode drivers

This commit is contained in:
Jeffrey Pfau 2014-02-08 03:23:05 -08:00
parent 764b3fce10
commit 6451aeaefc
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -30,6 +30,7 @@ struct GBASIODriver {
};
struct GBASIODriverSet {
struct GBASIODriver* normal;
struct GBASIODriver* multiplayer;
struct GBASIODriver* joybus;
};