SDL: Throttling key is now mappale (default: TAB)

This commit is contained in:
punkrockguy318 2010-02-20 04:04:38 +00:00
parent b0786740a2
commit d503388437
2 changed files with 11 additions and 6 deletions

View File

@ -312,6 +312,7 @@ InitConfig()
config->addOption(prefix + "DecreaseSpeed", SDLK_MINUS);
config->addOption(prefix + "IncreaseSpeed", SDLK_EQUALS);
config->addOption(prefix + "FrameAdvance", SDLK_BACKSLASH);
config->addOption(prefix + "FastForward", SDLK_TAB);
config->addOption(prefix + "InputDisplay", SDLK_i);
config->addOption(prefix + "MovieToggleReadWrite", SDLK_q);
#ifdef CREATE_AVI

View File

@ -166,6 +166,7 @@ int pauseKey;
int decreaseSpeedKey;
int increaseSpeedKey;
int frameAdvanceKey;
int ffKey;
int powerKey;
int bindStateKey;
int frameAdvanceLagSkipKey;
@ -198,6 +199,7 @@ void setHotKeys()
g_config->getOption("SDL.Hotkeys.IncreaseSpeed", &increaseSpeedKey);
g_config->getOption("SDL.Hotkeys.DecreaseSpeed", &decreaseSpeedKey);
g_config->getOption("SDL.Hotkeys.FrameAdvance", &frameAdvanceKey);
g_config->getOption("SDL.Hotkeys.FastForward", &ffKey);
g_config->getOption("SDL.Hotkeys.Power", &powerKey);
g_config->getOption("SDL.Hotkeys.Pause", &bindStateKey);
g_config->getOption("SDL.Hotkeys.FrameAdvanceLagSkip", &frameAdvanceLagSkipKey);
@ -424,11 +426,7 @@ KeyboardCommands()
ToggleFS();
}
// Toggle throttling
NoWaiting &= ~1;
if(KEY(TAB)) {
NoWaiting |= 1;
}
// Toggle Movie auto-backup
if(keyonly(M) && is_shift) {
@ -507,7 +505,7 @@ KeyboardCommands()
}
}
}
if(_keyonly(decreaseSpeedKey)) {
DecreaseEmulationSpeed();
@ -542,6 +540,12 @@ KeyboardCommands()
FCEUI_ToggleEmulationPause();
}
// Toggle throttling
NoWaiting &= ~1;
if(g_keyState[ffKey]) {
NoWaiting |= 1;
}
static bool frameAdvancing = false;
if(g_keyState[frameAdvanceKey])
{