diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp index b099bac6..9589430f 100644 --- a/src/drivers/win/input.cpp +++ b/src/drivers/win/input.cpp @@ -1057,11 +1057,11 @@ static void DoTBConfig(HWND hParent, const char *text, char *_template, ButtConf const unsigned int NUMBER_OF_PORTS = 2; -const unsigned int NUMBER_OF_NES_DEVICES = SI_COUNT; -const static unsigned int NUMBER_OF_FAMICOM_DEVICES = SIFC_COUNT; +const unsigned int NUMBER_OF_NES_DEVICES = SI_COUNT + 1; +const static unsigned int NUMBER_OF_FAMICOM_DEVICES = SIFC_COUNT + 1; //these are unfortunate lists. they match the ESI and ESIFC enums -static const int configurable_nes[6]= { 0, 1, 0, 1, 1, 0 }; -static const int configurable_fam[14]= { 0,0,0,0, 1,1,0,1, 1,1,1,0, 0,0 }; +static const int configurable_nes[NUMBER_OF_NES_DEVICES]= { 0, 1, 0, 1, 1, 0 }; +static const int configurable_fam[NUMBER_OF_FAMICOM_DEVICES]= { 0,0,0,0, 1,1,0,1, 1,1,1,0, 0,0 }; const unsigned int FAMICOM_POSITION = 2; static void UpdateComboPad(HWND hwndDlg, WORD id) diff --git a/src/git.h b/src/git.h index 92dd113c..3adb1e67 100644 --- a/src/git.h +++ b/src/git.h @@ -49,10 +49,11 @@ inline const char* ESI_Name(ESI esi) "Zapper", "Power Pad A", "Power Pad B", - "Arkanoid Paddle" + "Arkanoid Paddle", + "Mouse" }; - if(esi >= SI_NONE && esi < SI_COUNT) + if(esi >= SI_NONE && esi <= SI_COUNT) return names[esi]; else return ""; } @@ -101,7 +102,7 @@ inline const char* ESIFC_Name(ESIFC esifc) "Top Rider" }; - if(esifc >= SIFC_NONE && esifc < SIFC_COUNT) + if(esifc >= SIFC_NONE && esifc <= SIFC_COUNT) return names[esifc]; else return ""; }