diff --git a/src/driver.h b/src/driver.h index da5cb159..7e74f41d 100644 --- a/src/driver.h +++ b/src/driver.h @@ -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); diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index 6f27d5bb..2644e4dd 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -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; } diff --git a/src/drivers/win/args.cpp b/src/drivers/win/args.cpp index 7c680943..8f55c992 100644 --- a/src/drivers/win/args.cpp +++ b/src/drivers/win/args.cpp @@ -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}, }; diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp index cafc0b70..6045a675 100644 --- a/src/drivers/win/input.cpp +++ b/src/drivers/win/input.cpp @@ -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) { diff --git a/src/input.cpp b/src/input.cpp index 3b704d5b..f5ee9355 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -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", }, diff --git a/src/input.h b/src/input.h index ed758c24..3e5ce5b2 100644 --- a/src/input.h +++ b/src/input.h @@ -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,