Add turbo toggle hotkey and -turbo [0/1] cmdline option. (Win32 only.)
This commit is contained in:
parent
12bdce8669
commit
2c777eb656
|
@ -317,6 +317,7 @@ enum EMUSPEED_SET
|
|||
void FCEUD_SetEmulationSpeed(int cmd);
|
||||
void FCEUD_TurboOn(void);
|
||||
void FCEUD_TurboOff(void);
|
||||
void FCEUD_TurboToggle(void);
|
||||
|
||||
int FCEUD_ShowStatusIcon(void);
|
||||
void FCEUD_ToggleStatusIcon(void);
|
||||
|
|
|
@ -570,8 +570,6 @@ void FCEUD_PrintError(const char *errormsg)
|
|||
|
||||
#define DUMMY(__f) void __f(void) {printf("%s\n", #__f); FCEU_DispMessage("Not implemented.");}
|
||||
DUMMY(FCEUD_HideMenuToggle)
|
||||
DUMMY(FCEUD_TurboOn)
|
||||
DUMMY(FCEUD_TurboOff)
|
||||
DUMMY(FCEUD_SaveStateAs)
|
||||
DUMMY(FCEUD_LoadStateFrom)
|
||||
DUMMY(FCEUD_MovieRecordTo)
|
||||
|
@ -584,5 +582,7 @@ int FCEUD_ShowStatusIcon(void) {return 0;}
|
|||
bool FCEUI_AviIsRecording(void) {return false;}
|
||||
void FCEUI_UseInputPreset(int preset) { }
|
||||
bool FCEUD_PauseAfterPlayback() { return false; }
|
||||
bool moviePleaseLogSavestates = false;
|
||||
|
||||
// These are actually fine, but will be unused and overriden by the current UI code.
|
||||
void FCEUD_TurboOn (void) { NoWaiting|= 1; }
|
||||
void FCEUD_TurboOff (void) { NoWaiting&=~1; }
|
||||
void FCEUD_TurboToggle(void) { NoWaiting^= 1; }
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
char* MovieToLoad = 0;
|
||||
char* StateToLoad = 0;
|
||||
extern bool turbo;
|
||||
|
||||
// TODO: Parsing arguments needs to be improved a lot. A LOT.
|
||||
|
||||
|
@ -51,6 +52,7 @@ char *ParseArgies(int argc, char *argv[])
|
|||
{"-allowUDLR",0,&allowUDLR,0},
|
||||
{"-stopmovie",0,&pauseAfterPlayback,0},
|
||||
{"-bginput",0,&EnableBackgroundInput,0},
|
||||
{"-turbo",0,&turbo,0},
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
|
|
|
@ -1431,17 +1431,9 @@ int FCEUD_TestCommandState(int c)
|
|||
return keys[cmdmask] ? 1 : 0;
|
||||
}
|
||||
|
||||
void FCEUD_TurboOn(void)
|
||||
{
|
||||
//NoWaiting|=1;
|
||||
turbo = true;
|
||||
}
|
||||
|
||||
void FCEUD_TurboOff(void)
|
||||
{
|
||||
//NoWaiting&=~1;
|
||||
turbo = false;
|
||||
}
|
||||
void FCEUD_TurboOn (void) { turbo = true; }
|
||||
void FCEUD_TurboOff (void) { turbo = false; }
|
||||
void FCEUD_TurboToggle(void) { turbo = !turbo; }
|
||||
|
||||
void FCEUI_UseInputPreset(int preset)
|
||||
{
|
||||
|
|
|
@ -624,6 +624,7 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
|
|||
{ EMUCMD_SPEED_FASTER, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Speed Up", },
|
||||
{ EMUCMD_SPEED_FASTEST, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Fastest Speed", },
|
||||
{ EMUCMD_SPEED_TURBO, EMUCMDTYPE_SPEED, FCEUD_TurboOn, FCEUD_TurboOff, 0, "Turbo", },
|
||||
{ EMUCMD_SPEED_TURBO_TOGGLE, EMUCMDTYPE_SPEED, FCEUD_TurboToggle, 0, 0, "Turbo Toggle", },
|
||||
|
||||
{ EMUCMD_SAVE_SLOT_0, EMUCMDTYPE_STATE, CommandSelectSaveSlot, 0, 0, "Savestate Slot 0", },
|
||||
{ EMUCMD_SAVE_SLOT_1, EMUCMDTYPE_STATE, CommandSelectSaveSlot, 0, 0, "Savestate Slot 1", },
|
||||
|
|
|
@ -117,6 +117,7 @@ enum EMUCMD
|
|||
EMUCMD_SPEED_FASTER,
|
||||
EMUCMD_SPEED_FASTEST,
|
||||
EMUCMD_SPEED_TURBO,
|
||||
EMUCMD_SPEED_TURBO_TOGGLE,
|
||||
|
||||
EMUCMD_SAVE_SLOT_0,
|
||||
EMUCMD_SAVE_SLOT_1,
|
||||
|
|
Loading…
Reference in New Issue