diff --git a/src/common/settings.h b/src/common/settings.h index 21f10e62e..c09021e60 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -623,6 +623,10 @@ void RenameCurrentProfile(std::string new_name); extern bool is_temporary_frame_limit; extern double temporary_frame_limit; +static inline void ResetTemporaryFrameLimit() { + is_temporary_frame_limit = false; + temporary_frame_limit = 0; +} static inline double GetFrameLimit() { return is_temporary_frame_limit ? temporary_frame_limit : values.frame_limit.GetValue(); } diff --git a/src/core/core.cpp b/src/core/core.cpp index b017dc413..321e72646 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -293,6 +293,7 @@ System::ResultStatus System::SingleStep() { System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath, Frontend::EmuWindow* secondary_window) { + Settings::ResetTemporaryFrameLimit(); FileUtil::SetCurrentRomPath(filepath); if (early_app_loader) { app_loader = std::move(early_app_loader); diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 164e46feb..e4ba9d888 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1454,7 +1454,9 @@ Result SVC::KernelSetState(u32 kernel_state, u32 varg1, u32 varg2) { u16 new_value = static_cast(varg1); if (new_value == 0xFFFF) { Settings::is_temporary_frame_limit = false; + Settings::temporary_frame_limit = 0; } else { + Settings::is_temporary_frame_limit = true; Settings::temporary_frame_limit = static_cast(new_value); } } break;