From e2694b2570980b8f28fa32c70d7f695595613c6e Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 8 Mar 2021 11:44:02 +1000 Subject: [PATCH] Cheevos: Fix unlimited fast forward in hardcode mode --- src/frontend-common/common_host_interface.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index f5b8c2bc7..55a36f608 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -2664,9 +2664,11 @@ void CommonHostInterface::FixIncompatibleSettings(bool display_osd_messages) // if challenge mode is enabled, disable things like rewind since they use save states if (IsCheevosChallengeModeActive()) { - g_settings.emulation_speed = std::max(g_settings.emulation_speed, 1.0f); - g_settings.fast_forward_speed = std::max(g_settings.fast_forward_speed, 1.0f); - g_settings.turbo_speed = std::max(g_settings.turbo_speed, 1.0f); + g_settings.emulation_speed = + (g_settings.emulation_speed != 0.0f) ? std::max(g_settings.emulation_speed, 1.0f) : 0.0f; + g_settings.fast_forward_speed = + (g_settings.fast_forward_speed != 0.0f) ? std::max(g_settings.fast_forward_speed, 1.0f) : 0.0f; + g_settings.turbo_speed = (g_settings.turbo_speed != 0.0f) ? std::max(g_settings.turbo_speed, 1.0f) : 0.0f; g_settings.rewind_enable = false; g_settings.auto_load_cheats = false; g_settings.debugging.enable_gdb_server = false;