From 928bc88b0112b7a4afcc9cb38db3973a6292abdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 17 Aug 2021 16:48:47 +0200 Subject: [PATCH] Rename Unthrottle to Fast-forward globally --- Common/Input/InputState.h | 2 +- Core/Config.cpp | 32 ++++++++++++++--------------- Core/Config.h | 4 ++-- Core/ConfigValues.h | 2 +- Core/CoreParameter.h | 2 +- Core/HLE/sceDisplay.cpp | 22 ++++++++++---------- Core/HW/StereoResampler.cpp | 8 ++++---- Core/KeyMap.cpp | 20 +++++++++--------- Core/KeyMap.h | 2 +- GPU/GPUCommon.cpp | 2 +- UI/DevScreens.cpp | 1 + UI/EmuScreen.cpp | 8 ++++---- UI/GamepadEmu.cpp | 14 ++++++------- UI/GamepadEmu.h | 2 +- UI/TouchControlLayoutScreen.cpp | 4 ++-- UI/TouchControlVisibilityScreen.cpp | 2 +- Windows/XinputDevice.cpp | 2 +- android/jni/TestRunner.cpp | 2 +- headless/Headless.cpp | 4 ++-- libretro/libretro.cpp | 4 ++-- unittest/JitHarness.cpp | 2 +- 21 files changed, 71 insertions(+), 70 deletions(-) diff --git a/Common/Input/InputState.h b/Common/Input/InputState.h index 02377f3b24..3c917af1b0 100644 --- a/Common/Input/InputState.h +++ b/Common/Input/InputState.h @@ -69,7 +69,7 @@ enum { PAD_BUTTON_LEFT_TRIGGER = 1 << 21, // Click left thumb stick on X360 PAD_BUTTON_RIGHT_TRIGGER = 1 << 22, // Click left thumb stick on X360 - PAD_BUTTON_UNTHROTTLE = 1 << 20, // Click Tab to unthrottle + PAD_BUTTON_FASTFORWARD = 1 << 20, // Click Tab to unthrottle }; #ifndef MAX_KEYQUEUESIZE diff --git a/Core/Config.cpp b/Core/Config.cpp index 9835597fae..023d006c74 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -621,11 +621,11 @@ static int DefaultInternalResolution() { #endif } -static int DefaultUnthrottleMode() { +static int DefaultFastForwardMode() { #if PPSSPP_PLATFORM(ANDROID) || defined(USING_QT_UI) || PPSSPP_PLATFORM(UWP) || PPSSPP_PLATFORM(IOS) - return (int)UnthrottleMode::SKIP_FLIP; + return (int)FastForwardMode::SKIP_FLIP; #else - return (int)UnthrottleMode::CONTINUOUS; + return (int)FastForwardMode::CONTINUOUS; #endif } @@ -792,23 +792,23 @@ struct ConfigTranslator { typedef ConfigTranslator GPUBackendTranslator; -static int UnthrottleModeFromString(const std::string &s) { +static int FastForwardModeFromString(const std::string &s) { if (!strcasecmp(s.c_str(), "CONTINUOUS")) - return (int)UnthrottleMode::CONTINUOUS; + return (int)FastForwardMode::CONTINUOUS; if (!strcasecmp(s.c_str(), "SKIP_DRAW")) - return (int)UnthrottleMode::SKIP_DRAW; + return (int)FastForwardMode::SKIP_DRAW; if (!strcasecmp(s.c_str(), "SKIP_FLIP")) - return (int)UnthrottleMode::SKIP_FLIP; - return DefaultUnthrottleMode(); + return (int)FastForwardMode::SKIP_FLIP; + return DefaultFastForwardMode(); } -std::string UnthrottleModeToString(int v) { - switch (UnthrottleMode(v)) { - case UnthrottleMode::CONTINUOUS: +std::string FastForwardModeToString(int v) { + switch (FastForwardMode(v)) { + case FastForwardMode::CONTINUOUS: return "CONTINUOUS"; - case UnthrottleMode::SKIP_DRAW: + case FastForwardMode::SKIP_DRAW: return "SKIP_DRAW"; - case UnthrottleMode::SKIP_FLIP: + case FastForwardMode::SKIP_FLIP: return "SKIP_FLIP"; } return "CONTINUOUS"; @@ -843,7 +843,7 @@ static ConfigSetting graphicsSettings[] = { ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false, true, true), ConfigSetting("FrameRate", &g_Config.iFpsLimit1, 0, true, true), ConfigSetting("FrameRate2", &g_Config.iFpsLimit2, -1, true, true), - ConfigSetting("UnthrottlingMode", &g_Config.iUnthrottleMode, &DefaultUnthrottleMode, &UnthrottleModeToString, &UnthrottleModeFromString, true, true), + ConfigSetting("UnthrottlingMode", &g_Config.iFastForwardMode, &DefaultFastForwardMode, &FastForwardModeToString, &FastForwardModeFromString, true, true), #if defined(USING_WIN_UI) ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false), #endif @@ -999,7 +999,7 @@ static ConfigSetting controlSettings[] = { ConfigSetting("DPadSpacing", &g_Config.fDpadSpacing, 1.0f, true, true), ConfigSetting("StartKeyX", "StartKeyY", "StartKeyScale", "ShowTouchStart", &g_Config.touchStartKey, defaultTouchPosShow, true, true), ConfigSetting("SelectKeyX", "SelectKeyY", "SelectKeyScale", "ShowTouchSelect", &g_Config.touchSelectKey, defaultTouchPosShow, true, true), - ConfigSetting("UnthrottleKeyX", "UnthrottleKeyY", "UnthrottleKeyScale", "ShowTouchUnthrottle", &g_Config.touchUnthrottleKey, defaultTouchPosShow, true, true), + ConfigSetting("UnthrottleKeyX", "UnthrottleKeyY", "UnthrottleKeyScale", "ShowTouchUnthrottle", &g_Config.touchFastForwardKey, defaultTouchPosShow, true, true), ConfigSetting("LKeyX", "LKeyY", "LKeyScale", "ShowTouchLTrigger", &g_Config.touchLKey, defaultTouchPosShow, true, true), ConfigSetting("RKeyX", "RKeyY", "RKeyScale", "ShowTouchRTrigger", &g_Config.touchRKey, defaultTouchPosShow, true, true), ConfigSetting("AnalogStickX", "AnalogStickY", "AnalogStickScale", "ShowAnalogStick", &g_Config.touchAnalogStick, defaultTouchPosShow, true, true), @@ -1834,7 +1834,7 @@ void Config::ResetControlLayout() { g_Config.fDpadSpacing = 1.0f; reset(g_Config.touchStartKey); reset(g_Config.touchSelectKey); - reset(g_Config.touchUnthrottleKey); + reset(g_Config.touchFastForwardKey); reset(g_Config.touchLKey); reset(g_Config.touchRKey); reset(g_Config.touchAnalogStick); diff --git a/Core/Config.h b/Core/Config.h index cf0711b139..06562aa18b 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -173,7 +173,7 @@ public: bool bVSync; int iFrameSkip; int iFrameSkipType; - int iUnthrottleMode; // See UnthrottleMode in ConfigValues.h. + int iFastForwardMode; // See FastForwardMode in ConfigValues.h. bool bAutoFrameSkip; bool bEnableCardboardVR; // Cardboard Master Switch @@ -348,7 +348,7 @@ public: float fDpadSpacing; ConfigTouchPos touchStartKey; ConfigTouchPos touchSelectKey; - ConfigTouchPos touchUnthrottleKey; + ConfigTouchPos touchFastForwardKey; ConfigTouchPos touchLKey; ConfigTouchPos touchRKey; ConfigTouchPos touchAnalogStick; diff --git a/Core/ConfigValues.h b/Core/ConfigValues.h index cbdee70a0b..a3899b0646 100644 --- a/Core/ConfigValues.h +++ b/Core/ConfigValues.h @@ -111,7 +111,7 @@ enum class AutoLoadSaveState { NEWEST = 2, }; -enum class UnthrottleMode { +enum class FastForwardMode { CONTINUOUS = 0, SKIP_DRAW = 1, SKIP_FLIP = 2, diff --git a/Core/CoreParameter.h b/Core/CoreParameter.h index a0589aefc5..1b98277bf5 100644 --- a/Core/CoreParameter.h +++ b/Core/CoreParameter.h @@ -75,7 +75,7 @@ struct CoreParameter { int pixelHeight; // Can be modified at runtime. - bool unthrottle = false; + bool fastForward = false; FPSLimit fpsLimit = FPSLimit::NORMAL; bool updateRecent = true; diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index eaa44a0f2d..279bd2642a 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -518,7 +518,7 @@ static bool FrameTimingThrottled() { if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM2 && g_Config.iFpsLimit2 == 0) { return false; } - return !PSP_CoreParameter().unthrottle; + return !PSP_CoreParameter().fastForward; } static void DoFrameDropLogging(float scaledTimestep) { @@ -557,16 +557,16 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) { // we have nothing to do here. bool doFrameSkip = g_Config.iFrameSkip != 0; - bool unthrottleNeedsSkip = g_Config.iUnthrottleMode == (int)UnthrottleMode::SKIP_DRAW; + bool fastForwardNeedsSkip = g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_DRAW; if (g_Config.bVSync && GetGPUBackend() == GPUBackend::VULKAN) { // Vulkan doesn't support the interval setting, so we force frameskip. - unthrottleNeedsSkip = true; + fastForwardNeedsSkip = true; // If it's not a clean multiple of 60, we may need frameskip to achieve it. if (fpsLimit == 0 || (fpsLimit >= 0 && fpsLimit != 15 && fpsLimit != 30 && fpsLimit != 60)) { doFrameSkip = true; } } - if (!throttle && unthrottleNeedsSkip) { + if (!throttle && fastForwardNeedsSkip) { doFrameSkip = true; skipFrame = true; if (numSkippedFrames >= 7) { @@ -599,7 +599,7 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) { } // Auto-frameskip automatically if speed limit is set differently than the default. - bool forceFrameskip = fpsLimit > 60 && unthrottleNeedsSkip; + bool forceFrameskip = fpsLimit > 60 && fastForwardNeedsSkip; int frameSkipNum = CalculateFrameSkip(); if (g_Config.bAutoFrameSkip || forceFrameskip) { // autoframeskip @@ -622,7 +622,7 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) { // timestamp to push it to display, and sleep in the render thread to achieve that. if (curFrameTime < nextFrameTime && throttle) { - // If time gap is huge just jump (somebody unthrottled) + // If time gap is huge just jump (somebody fast-forwarded) if (nextFrameTime - curFrameTime > 2*scaledTimestep) { nextFrameTime = curFrameTime; } else { @@ -750,14 +750,14 @@ void __DisplayFlip(int cyclesLate) { bool duplicateFrames = g_Config.bRenderDuplicateFrames && g_Config.iFrameSkip == 0; - bool unthrottleNeedsSkip = g_Config.iUnthrottleMode != (int)UnthrottleMode::CONTINUOUS; + bool fastForwardNeedsSkip = g_Config.iFastForwardMode != (int)FastForwardMode::CONTINUOUS; if (g_Config.bVSync && GetGPUBackend() == GPUBackend::VULKAN) { // Vulkan doesn't support the interval setting, so we force frameskip. - unthrottleNeedsSkip = true; + fastForwardNeedsSkip = true; } // postEffectRequiresFlip is not compatible with frameskip unthrottling, see #12325. - if (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE && !(unthrottleNeedsSkip && !FrameTimingThrottled())) { + if (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE && !(fastForwardNeedsSkip && !FrameTimingThrottled())) { postEffectRequiresFlip = duplicateFrames || g_Config.bShaderChainRequires60FPS; } @@ -786,9 +786,9 @@ void __DisplayFlip(int cyclesLate) { } bool forceNoFlip = false; - // Alternative to frameskip unthrottle, where we draw everything. + // Alternative to frameskip fast-forward, where we draw everything. // Useful if skipping a frame breaks graphics or for checking drawing speed. - if (g_Config.iUnthrottleMode == (int)UnthrottleMode::SKIP_FLIP && !FrameTimingThrottled()) { + if (g_Config.iFastForwardMode == (int)FastForwardMode::SKIP_FLIP && !FrameTimingThrottled()) { static double lastFlip = 0; double now = time_now_d(); if ((now - lastFlip) < 1.0f / System_GetPropertyFloat(SYSPROP_DISPLAY_REFRESH_RATE)) { diff --git a/Core/HW/StereoResampler.cpp b/Core/HW/StereoResampler.cpp index 5445984546..09864c98a1 100644 --- a/Core/HW/StereoResampler.cpp +++ b/Core/HW/StereoResampler.cpp @@ -143,7 +143,7 @@ inline void ClampBufferToS16(s16 *out, const s32 *in, size_t size, s8 volShift) inline void ClampBufferToS16WithVolume(s16 *out, const s32 *in, size_t size) { int volume = g_Config.iGlobalVolume; - if (PSP_CoreParameter().fpsLimit != FPSLimit::NORMAL || PSP_CoreParameter().unthrottle) { + if (PSP_CoreParameter().fpsLimit != FPSLimit::NORMAL || PSP_CoreParameter().fastForward) { if (g_Config.iAltSpeedVolume != -1) { volume = g_Config.iAltSpeedVolume; } @@ -266,15 +266,15 @@ void StereoResampler::PushSamples(const s32 *samples, unsigned int numSamples) { u32 indexW = m_indexW.load(); u32 cap = m_maxBufsize * 2; - // If unthrottling, no need to fill up the entire buffer, just screws up timing after releasing unthrottle. - if (PSP_CoreParameter().unthrottle) { + // If unthrottling, no need to fill up the entire buffer, just screws up timing after releasing the fast-forward button. + if (PSP_CoreParameter().fastForward) { cap = m_targetBufsize * 2; } // Check if we have enough free space // indexW == m_indexR results in empty buffer, so indexR must always be smaller than indexW if (numSamples * 2 + ((indexW - m_indexR.load()) & INDEX_MASK) >= cap) { - if (!PSP_CoreParameter().unthrottle) { + if (!PSP_CoreParameter().fastForward) { overrunCount_++; } // TODO: "Timestretch" by doing a windowed overlap with existing buffer content? diff --git a/Core/KeyMap.cpp b/Core/KeyMap.cpp index 2015a4c941..c15f8dc6c7 100644 --- a/Core/KeyMap.cpp +++ b/Core/KeyMap.cpp @@ -77,7 +77,7 @@ static const DefMappingStruct defaultQwertyKeyboardKeyMap[] = { {VIRTKEY_AXIS_X_MIN, NKCODE_J}, {VIRTKEY_AXIS_X_MAX, NKCODE_L}, {VIRTKEY_RAPID_FIRE, NKCODE_SHIFT_LEFT}, - {VIRTKEY_UNTHROTTLE, NKCODE_TAB}, + {VIRTKEY_FASTFORWARD, NKCODE_TAB}, {VIRTKEY_SPEED_TOGGLE, NKCODE_GRAVE}, {VIRTKEY_PAUSE , NKCODE_ESCAPE}, {VIRTKEY_REWIND , NKCODE_DEL}, @@ -107,7 +107,7 @@ static const DefMappingStruct defaultAzertyKeyboardKeyMap[] = { {VIRTKEY_AXIS_X_MIN, NKCODE_J}, {VIRTKEY_AXIS_X_MAX, NKCODE_L}, {VIRTKEY_RAPID_FIRE, NKCODE_SHIFT_LEFT}, - {VIRTKEY_UNTHROTTLE, NKCODE_TAB}, + {VIRTKEY_FASTFORWARD, NKCODE_TAB}, {VIRTKEY_SPEED_TOGGLE, NKCODE_GRAVE}, {VIRTKEY_PAUSE , NKCODE_ESCAPE}, {VIRTKEY_REWIND , NKCODE_DEL}, @@ -137,7 +137,7 @@ static const DefMappingStruct defaultQwertzKeyboardKeyMap[] = { {VIRTKEY_AXIS_X_MIN, NKCODE_J}, {VIRTKEY_AXIS_X_MAX, NKCODE_L}, {VIRTKEY_RAPID_FIRE, NKCODE_SHIFT_LEFT}, - {VIRTKEY_UNTHROTTLE, NKCODE_TAB}, + {VIRTKEY_FASTFORWARD, NKCODE_TAB}, {VIRTKEY_SPEED_TOGGLE, NKCODE_GRAVE}, {VIRTKEY_PAUSE , NKCODE_ESCAPE}, {VIRTKEY_REWIND , NKCODE_DEL}, @@ -161,7 +161,7 @@ static const DefMappingStruct default360KeyMap[] = { {CTRL_SELECT , NKCODE_BUTTON_SELECT}, {CTRL_LTRIGGER , NKCODE_BUTTON_L1}, {CTRL_RTRIGGER , NKCODE_BUTTON_R1}, - {VIRTKEY_UNTHROTTLE , JOYSTICK_AXIS_RTRIGGER, +1}, + {VIRTKEY_FASTFORWARD , JOYSTICK_AXIS_RTRIGGER, +1}, {VIRTKEY_SPEED_TOGGLE, NKCODE_BUTTON_THUMBR}, {VIRTKEY_PAUSE , JOYSTICK_AXIS_LTRIGGER, +1}, {VIRTKEY_PAUSE, NKCODE_HOME}, @@ -185,7 +185,7 @@ static const DefMappingStruct defaultShieldKeyMap[] = { {CTRL_UP, JOYSTICK_AXIS_HAT_Y, -1}, {CTRL_DOWN, JOYSTICK_AXIS_HAT_Y, +1}, {VIRTKEY_SPEED_TOGGLE, JOYSTICK_AXIS_LTRIGGER, +1 }, - {VIRTKEY_UNTHROTTLE, JOYSTICK_AXIS_RTRIGGER, +1 }, + {VIRTKEY_FASTFORWARD, JOYSTICK_AXIS_RTRIGGER, +1 }, {VIRTKEY_PAUSE, NKCODE_BACK }, }; @@ -206,7 +206,7 @@ static const DefMappingStruct defaultMOQI7SKeyMap[] = { {CTRL_RIGHT, JOYSTICK_AXIS_HAT_X, +1}, {CTRL_UP, JOYSTICK_AXIS_HAT_Y, -1}, {CTRL_DOWN, JOYSTICK_AXIS_HAT_Y, +1}, - {VIRTKEY_UNTHROTTLE, JOYSTICK_AXIS_RZ, +1 }, + {VIRTKEY_FASTFORWARD, JOYSTICK_AXIS_RZ, +1 }, {VIRTKEY_PAUSE, NKCODE_BACK }, }; @@ -229,7 +229,7 @@ static const DefMappingStruct defaultPadMap[] = { {CTRL_SELECT , NKCODE_BACK}, {CTRL_LTRIGGER , NKCODE_BUTTON_L1}, {CTRL_RTRIGGER , NKCODE_BUTTON_R1}, - {VIRTKEY_UNTHROTTLE , NKCODE_BUTTON_R2}, + {VIRTKEY_FASTFORWARD , NKCODE_BUTTON_R2}, {VIRTKEY_PAUSE , JOYSTICK_AXIS_LTRIGGER, +1}, {VIRTKEY_SPEED_TOGGLE, NKCODE_BUTTON_L2}, {VIRTKEY_AXIS_X_MIN, JOYSTICK_AXIS_X, -1}, @@ -270,7 +270,7 @@ static const DefMappingStruct defaultOuyaMap[] = { {CTRL_SELECT , NKCODE_BUTTON_L2}, {CTRL_LTRIGGER , NKCODE_BUTTON_L1}, {CTRL_RTRIGGER , NKCODE_BUTTON_R1}, - {VIRTKEY_UNTHROTTLE , NKCODE_BUTTON_THUMBL}, + {VIRTKEY_FASTFORWARD , NKCODE_BUTTON_THUMBL}, {VIRTKEY_PAUSE , NKCODE_BUTTON_THUMBR}, {VIRTKEY_AXIS_X_MIN, JOYSTICK_AXIS_X, -1}, {VIRTKEY_AXIS_X_MAX, JOYSTICK_AXIS_X, +1}, @@ -689,7 +689,7 @@ const KeyMap_IntStrPair psp_button_names[] = { {VIRTKEY_ANALOG_LIGHTLY, "Analog limiter"}, {VIRTKEY_RAPID_FIRE, "RapidFire"}, - {VIRTKEY_UNTHROTTLE, "Unthrottle"}, + {VIRTKEY_FASTFORWARD, "Fast-forward"}, {VIRTKEY_SPEED_TOGGLE, "SpeedToggle"}, {VIRTKEY_SPEED_CUSTOM1, "Alt speed 1"}, {VIRTKEY_SPEED_CUSTOM2, "Alt speed 2"}, @@ -1065,7 +1065,7 @@ void AutoConfForPad(const std::string &name) { #ifndef MOBILE_DEVICE // Add a couple of convenient keyboard mappings by default, too. g_controllerMap[VIRTKEY_PAUSE].push_back(KeyDef(DEVICE_ID_KEYBOARD, NKCODE_ESCAPE)); - g_controllerMap[VIRTKEY_UNTHROTTLE].push_back(KeyDef(DEVICE_ID_KEYBOARD, NKCODE_TAB)); + g_controllerMap[VIRTKEY_FASTFORWARD].push_back(KeyDef(DEVICE_ID_KEYBOARD, NKCODE_TAB)); g_controllerMapGeneration++; #endif } diff --git a/Core/KeyMap.h b/Core/KeyMap.h index d8b7a8a710..011cf03c54 100644 --- a/Core/KeyMap.h +++ b/Core/KeyMap.h @@ -35,7 +35,7 @@ enum { VIRTKEY_AXIS_X_MAX = 0x40000003, VIRTKEY_AXIS_Y_MAX = 0x40000004, VIRTKEY_RAPID_FIRE = 0x40000005, - VIRTKEY_UNTHROTTLE = 0x40000006, + VIRTKEY_FASTFORWARD = 0x40000006, VIRTKEY_PAUSE = 0x40000007, VIRTKEY_SPEED_TOGGLE = 0x40000008, VIRTKEY_AXIS_RIGHT_X_MIN = 0x40000009, diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index dfc9365245..efaedbb6a3 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -486,7 +486,7 @@ void GPUCommon::DeviceRestore() { void GPUCommon::UpdateVsyncInterval(bool force) { #if !(PPSSPP_PLATFORM(ANDROID) || defined(USING_QT_UI) || PPSSPP_PLATFORM(UWP) || PPSSPP_PLATFORM(IOS)) int desiredVSyncInterval = g_Config.bVSync ? 1 : 0; - if (PSP_CoreParameter().unthrottle) { + if (PSP_CoreParameter().fastForward) { desiredVSyncInterval = 0; } if (PSP_CoreParameter().fpsLimit != FPSLimit::NORMAL) { diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index eac304f5f4..fdd15ccb42 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -16,6 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include +#include #include "ppsspp_config.h" diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 2490c6abce..1d15015f0e 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -553,11 +553,11 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) { auto sc = GetI18NCategory("Screen"); switch (virtualKeyCode) { - case VIRTKEY_UNTHROTTLE: + case VIRTKEY_FASTFORWARD: if (coreState == CORE_STEPPING) { Core_EnableStepping(false); } - PSP_CoreParameter().unthrottle = true; + PSP_CoreParameter().fastForward = true; break; case VIRTKEY_SPEED_TOGGLE: @@ -699,8 +699,8 @@ void EmuScreen::onVKeyUp(int virtualKeyCode) { auto sc = GetI18NCategory("Screen"); switch (virtualKeyCode) { - case VIRTKEY_UNTHROTTLE: - PSP_CoreParameter().unthrottle = false; + case VIRTKEY_FASTFORWARD: + PSP_CoreParameter().fastForward = false; break; case VIRTKEY_SPEED_CUSTOM1: diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index 5d18052ed2..c5ef3f4cca 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -640,9 +640,9 @@ void InitPadLayout(float xres, float yres, float globalScale) { int select_key_Y = yres - 60 * scale; initTouchPos(g_Config.touchSelectKey, select_key_X, select_key_Y); - int unthrottle_key_X = halfW - bottom_key_spacing * scale; - int unthrottle_key_Y = yres - 60 * scale; - initTouchPos(g_Config.touchUnthrottleKey, unthrottle_key_X, unthrottle_key_Y); + int fast_forward_key_X = halfW - bottom_key_spacing * scale; + int fast_forward_key_Y = yres - 60 * scale; + initTouchPos(g_Config.touchFastForwardKey, fast_forward_key_X, fast_forward_key_Y); // L and R------------------------------------------------------------ // Put them above the analog stick / above the buttons to the right. @@ -773,10 +773,10 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause, ControlMappe addPSPButton(CTRL_START, "Start button", rectImage, ImageID("I_RECT"), ImageID("I_START"), g_Config.touchStartKey); addPSPButton(CTRL_SELECT, "Select button", rectImage, ImageID("I_RECT"), ImageID("I_SELECT"), g_Config.touchSelectKey); - BoolButton *unthrottle = addBoolButton(&PSP_CoreParameter().unthrottle, "Unthrottle button", rectImage, ImageID("I_RECT"), ImageID("I_ARROW"), g_Config.touchUnthrottleKey); - if (unthrottle) { - unthrottle->SetAngle(180.0f); - unthrottle->OnChange.Add([](UI::EventParams &e) { + BoolButton *fastForward = addBoolButton(&PSP_CoreParameter().fastForward, "Fast-forward button", rectImage, ImageID("I_RECT"), ImageID("I_ARROW"), g_Config.touchFastForwardKey); + if (fastForward) { + fastForward->SetAngle(180.0f); + fastForward->OnChange.Add([](UI::EventParams &e) { if (e.a && coreState == CORE_STEPPING) { Core_EnableStepping(false); } diff --git a/UI/GamepadEmu.h b/UI/GamepadEmu.h index 3e32054964..40f92da221 100644 --- a/UI/GamepadEmu.h +++ b/UI/GamepadEmu.h @@ -264,7 +264,7 @@ namespace CustomKey { { "L", ImageID("I_L"), CTRL_LTRIGGER }, { "R", ImageID("I_R"), CTRL_RTRIGGER }, { "RapidFire", ImageID::invalid(), VIRTKEY_RAPID_FIRE }, - { "Unthrottle", ImageID::invalid(), VIRTKEY_UNTHROTTLE }, + { "FastForward", ImageID::invalid(), VIRTKEY_FASTFORWARD }, { "SpeedToggle", ImageID::invalid(), VIRTKEY_SPEED_TOGGLE }, { "Rewind", ImageID::invalid(), VIRTKEY_REWIND }, { "Save State", ImageID::invalid(), VIRTKEY_SAVE_STATE }, diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 91a304ca25..e8bf4d85d7 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -369,8 +369,8 @@ void ControlLayoutView::CreateViews() { addDragDropButton(g_Config.touchSelectKey, "Select button", rectImage, ImageID("I_SELECT")); addDragDropButton(g_Config.touchStartKey, "Start button", rectImage, ImageID("I_START")); - if (auto *unthrottle = addDragDropButton(g_Config.touchUnthrottleKey, "Unthrottle button", rectImage, ImageID("I_ARROW"))) { - unthrottle->SetAngle(180.0f); + if (auto *fastForward = addDragDropButton(g_Config.touchFastForwardKey, "Fast-forward button", rectImage, ImageID("I_ARROW"))) { + fastForward->SetAngle(180.0f); } addDragDropButton(g_Config.touchLKey, "Left shoulder button", shoulderImage, ImageID("I_L")); if (auto *rbutton = addDragDropButton(g_Config.touchRKey, "Right shoulder button", shoulderImage, ImageID("I_R"))) { diff --git a/UI/TouchControlVisibilityScreen.cpp b/UI/TouchControlVisibilityScreen.cpp index 25c0cc60c3..a9110810ee 100644 --- a/UI/TouchControlVisibilityScreen.cpp +++ b/UI/TouchControlVisibilityScreen.cpp @@ -87,7 +87,7 @@ void TouchControlVisibilityScreen::CreateViews() { screenManager()->push(new RightAnalogMappingScreen()); return UI::EVENT_DONE; }}); - toggles_.push_back({ "Unthrottle", &g_Config.touchUnthrottleKey.show, ImageID::invalid(), nullptr }); + toggles_.push_back({ "Fast-forward", &g_Config.touchFastForwardKey.show, ImageID::invalid(), nullptr }); toggles_.push_back({ "Custom 1", &g_Config.touchCombo0.show, ImageID::invalid(), [=](EventParams &e) { screenManager()->push(new ComboKeyScreen(0)); return UI::EVENT_DONE; diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index 37128823bc..097fe23ecb 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -250,7 +250,7 @@ void XinputDevice::ApplyVibration(int pad, XINPUT_VIBRATION &vibration) { if (PSP_IsInited()) { newVibrationTime = time_now_d(); // We have to run PPSSPP_XInputSetState at time intervals - // since it bugs otherwise with very high unthrottle speeds + // since it bugs otherwise with very high fast-forward speeds // and freezes at constant vibration or no vibration at all. if (newVibrationTime - prevVibrationTime >= 1.0 / 64.0) { if (GetUIState() == UISTATE_INGAME) { diff --git a/android/jni/TestRunner.cpp b/android/jni/TestRunner.cpp index 281f904fab..6e9c3b792b 100644 --- a/android/jni/TestRunner.cpp +++ b/android/jni/TestRunner.cpp @@ -102,7 +102,7 @@ bool RunTests() { coreParam.pixelWidth = 480; coreParam.pixelHeight = 272; coreParam.collectEmuLog = &output; - coreParam.unthrottle = true; + coreParam.fastForward = true; coreParam.updateRecent = false; // Never report from tests. diff --git a/headless/Headless.cpp b/headless/Headless.cpp index fa433dae54..9a860018e5 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -370,7 +370,7 @@ int main(int argc, const char* argv[]) coreParameter.renderHeight = 272; coreParameter.pixelWidth = 480; coreParameter.pixelHeight = 272; - coreParameter.unthrottle = true; + coreParameter.fastForward = true; g_Config.bEnableSound = false; g_Config.bFirstRun = false; @@ -391,7 +391,7 @@ int main(int argc, const char* argv[]) g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CROSS; g_Config.iLockParentalLevel = 9; g_Config.iInternalResolution = 1; - g_Config.iUnthrottleMode = (int)UnthrottleMode::CONTINUOUS; + g_Config.iFastForwardMode = (int)FastForwardMode::CONTINUOUS; g_Config.bEnableLogging = fullLog; g_Config.bSoftwareSkinning = true; g_Config.bVertexDecoderJit = true; diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 66c080d2c0..a111c91ece 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -418,7 +418,7 @@ void retro_init(void) g_Config.bEnableLogging = true; // libretro does its own timing, so this should stay CONTINUOUS. - g_Config.iUnthrottleMode = (int)UnthrottleMode::CONTINUOUS; + g_Config.iFastForwardMode = (int)FastForwardMode::CONTINUOUS; g_Config.bMemStickInserted = true; g_Config.iGlobalVolume = VOLUME_FULL - 1; g_Config.iReverbVolume = VOLUME_FULL; @@ -683,7 +683,7 @@ bool retro_load_game(const struct retro_game_info *game) coreParam.startBreak = false; coreParam.printfEmuLog = true; coreParam.headLess = true; - coreParam.unthrottle = true; + coreParam.fastForward = true; coreParam.graphicsContext = ctx; coreParam.gpuCore = ctx->GetGPUCore(); coreParam.cpuCore = CPUCore::JIT; diff --git a/unittest/JitHarness.cpp b/unittest/JitHarness.cpp index 6743a5a62e..6575a1e323 100644 --- a/unittest/JitHarness.cpp +++ b/unittest/JitHarness.cpp @@ -87,7 +87,7 @@ static void SetupJitHarness() { g_symbolMap = new SymbolMap(); Memory::g_MemorySize = Memory::RAM_NORMAL_SIZE; PSP_CoreParameter().cpuCore = CPUCore::INTERPRETER; - PSP_CoreParameter().unthrottle = true; + PSP_CoreParameter().fastForward = true; Memory::Init(); mipsr4k.Reset();