sdl: rename InputType to CurInputType due to variable of same name in src/movie.h

This commit is contained in:
punkrockguy318 2011-09-12 14:02:23 +00:00
parent e0e0f72d2f
commit 19c607f530
1 changed files with 24 additions and 24 deletions

View File

@ -53,11 +53,11 @@ extern Config *g_config;
extern bool bindSavestate, frameAdvanceLagSkip, lagCounterDisplay; extern bool bindSavestate, frameAdvanceLagSkip, lagCounterDisplay;
/* UsrInputType[] is user-specified. InputType[] is current /* UsrInputType[] is user-specified. CurInputType[] is current
(game loading can override user settings) (game loading can override user settings)
*/ */
static int UsrInputType[NUM_INPUT_DEVICES]; static int UsrInputType[NUM_INPUT_DEVICES];
static int InputType[NUM_INPUT_DEVICES]; static int CurInputType[NUM_INPUT_DEVICES];
static int cspec = 0; static int cspec = 0;
extern int gametype; extern int gametype;
@ -70,7 +70,7 @@ InputUserActiveFix()
{ {
int x; int x;
for(x = 0; x < 3; x++) { for(x = 0; x < 3; x++) {
InputType[x] = UsrInputType[x]; CurInputType[x] = UsrInputType[x];
} }
} }
@ -82,18 +82,18 @@ ParseGIInput(FCEUGI *gi)
{ {
gametype=gi->type; gametype=gi->type;
InputType[0] = UsrInputType[0]; CurInputType[0] = UsrInputType[0];
InputType[1] = UsrInputType[1]; CurInputType[1] = UsrInputType[1];
InputType[2] = UsrInputType[2]; CurInputType[2] = UsrInputType[2];
if(gi->input[0]>=0) { if(gi->input[0]>=0) {
InputType[0] = gi->input[0]; CurInputType[0] = gi->input[0];
} }
if(gi->input[1]>=0) { if(gi->input[1]>=0) {
InputType[1] = gi->input[1]; CurInputType[1] = gi->input[1];
} }
if(gi->inputfc>=0) { if(gi->inputfc>=0) {
InputType[2] = gi->inputfc; CurInputType[2] = gi->inputfc;
} }
cspec = gi->cspecial; cspec = gi->cspecial;
} }
@ -390,7 +390,7 @@ KeyboardCommands()
#endif #endif
// check if the family keyboard is enabled // check if the family keyboard is enabled
if(InputType[2] == SIFC_FKB) { if(CurInputType[2] == SIFC_FKB) {
if(keyonly(SCROLLLOCK)) { if(keyonly(SCROLLLOCK)) {
g_fkbEnabled ^= 1; g_fkbEnabled ^= 1;
FCEUI_DispMessage("Family Keyboard %sabled.",0, FCEUI_DispMessage("Family Keyboard %sabled.",0,
@ -656,11 +656,11 @@ KeyboardCommands()
if (_keyonly(Hotkeys[HK_INCREASE_SPEED])) if (_keyonly(Hotkeys[HK_INCREASE_SPEED]))
FCEUI_NTSCINC(); FCEUI_NTSCINC();
if((InputType[2] == SIFC_BWORLD) || (cspec == SIS_DATACH)) { if((CurInputType[2] == SIFC_BWORLD) || (cspec == SIS_DATACH)) {
if(keyonly(F8)) { if(keyonly(F8)) {
barcoder ^= 1; barcoder ^= 1;
if(!barcoder) { if(!barcoder) {
if(InputType[2] == SIFC_BWORLD) { if(CurInputType[2] == SIFC_BWORLD) {
strcpy((char *)&BWorldData[1], (char *)bbuf); strcpy((char *)&BWorldData[1], (char *)bbuf);
BWorldData[0] = 1; BWorldData[0] = 1;
} else { } else {
@ -999,7 +999,7 @@ FCEUD_UpdateInput()
KeyboardCommands(); KeyboardCommands();
for(x = 0; x < 2; x++) { for(x = 0; x < 2; x++) {
switch(InputType[x]) { switch(CurInputType[x]) {
case SI_GAMEPAD: case SI_GAMEPAD:
t |= 1; t |= 1;
break; break;
@ -1016,7 +1016,7 @@ FCEUD_UpdateInput()
} }
} }
switch(InputType[2]) { switch(CurInputType[2]) {
case SIFC_ARKANOID: case SIFC_ARKANOID:
t |= 2; t |= 2;
break; break;
@ -1063,13 +1063,13 @@ void FCEUD_SetInput(bool fourscore, bool microphone, ESI port0, ESI port1, ESIFC
eoptions &= ~EO_FOURSCORE; eoptions &= ~EO_FOURSCORE;
if(fourscore) { // Four Score emulation, only support gamepads, nothing else if(fourscore) { // Four Score emulation, only support gamepads, nothing else
eoptions |= EO_FOURSCORE; eoptions |= EO_FOURSCORE;
InputType[0] = SI_GAMEPAD; // Controllers 1 and 3 CurInputType[0] = SI_GAMEPAD; // Controllers 1 and 3
InputType[1] = SI_GAMEPAD; // Controllers 2 and 4 CurInputType[1] = SI_GAMEPAD; // Controllers 2 and 4
InputType[2] = SIFC_NONE; // No extension CurInputType[2] = SIFC_NONE; // No extension
} else { // no Four Core emulation, check the config/movie file for controller types } else { // no Four Core emulation, check the config/movie file for controller types
InputType[0]=port0; CurInputType[0]=port0;
InputType[1]=port1; CurInputType[1]=port1;
InputType[2]=fcexp; CurInputType[2]=fcexp;
} }
replaceP2StartWithMicrophone = microphone; replaceP2StartWithMicrophone = microphone;
@ -1093,7 +1093,7 @@ InitInputInterface()
attrib = 0; attrib = 0;
InputDPtr = 0; InputDPtr = 0;
switch(InputType[x]) { switch(CurInputType[x]) {
case SI_POWERPADA: case SI_POWERPADA:
case SI_POWERPADB: case SI_POWERPADB:
InputDPtr = &powerpadbuf[x]; InputDPtr = &powerpadbuf[x];
@ -1111,12 +1111,12 @@ InitInputInterface()
attrib = 1; attrib = 1;
break; break;
} }
FCEUI_SetInput(x, (ESI)InputType[x], InputDPtr, attrib); FCEUI_SetInput(x, (ESI)CurInputType[x], InputDPtr, attrib);
} }
attrib = 0; attrib = 0;
InputDPtr = 0; InputDPtr = 0;
switch(InputType[2]) { switch(CurInputType[2]) {
case SIFC_SHADOW: case SIFC_SHADOW:
InputDPtr = MouseData; InputDPtr = MouseData;
t |= 1; t |= 1;
@ -1155,7 +1155,7 @@ InitInputInterface()
break; break;
} }
FCEUI_SetInputFC((ESIFC)InputType[2], InputDPtr, attrib); FCEUI_SetInputFC((ESIFC)CurInputType[2], InputDPtr, attrib);
FCEUI_SetInputFourscore((eoptions & EO_FOURSCORE)!=0); FCEUI_SetInputFourscore((eoptions & EO_FOURSCORE)!=0);
} }