mirror of
https://github.com/azahar-emu/azahar
synced 2025-11-07 07:29:58 +01:00
Fix temporary frame limit
This commit is contained in:
parent
c411c1ef96
commit
1df5db9128
@ -623,6 +623,10 @@ void RenameCurrentProfile(std::string new_name);
|
|||||||
|
|
||||||
extern bool is_temporary_frame_limit;
|
extern bool is_temporary_frame_limit;
|
||||||
extern double 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() {
|
static inline double GetFrameLimit() {
|
||||||
return is_temporary_frame_limit ? temporary_frame_limit : values.frame_limit.GetValue();
|
return is_temporary_frame_limit ? temporary_frame_limit : values.frame_limit.GetValue();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -293,6 +293,7 @@ System::ResultStatus System::SingleStep() {
|
|||||||
|
|
||||||
System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
|
System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::string& filepath,
|
||||||
Frontend::EmuWindow* secondary_window) {
|
Frontend::EmuWindow* secondary_window) {
|
||||||
|
Settings::ResetTemporaryFrameLimit();
|
||||||
FileUtil::SetCurrentRomPath(filepath);
|
FileUtil::SetCurrentRomPath(filepath);
|
||||||
if (early_app_loader) {
|
if (early_app_loader) {
|
||||||
app_loader = std::move(early_app_loader);
|
app_loader = std::move(early_app_loader);
|
||||||
|
|||||||
@ -1454,7 +1454,9 @@ Result SVC::KernelSetState(u32 kernel_state, u32 varg1, u32 varg2) {
|
|||||||
u16 new_value = static_cast<u16>(varg1);
|
u16 new_value = static_cast<u16>(varg1);
|
||||||
if (new_value == 0xFFFF) {
|
if (new_value == 0xFFFF) {
|
||||||
Settings::is_temporary_frame_limit = false;
|
Settings::is_temporary_frame_limit = false;
|
||||||
|
Settings::temporary_frame_limit = 0;
|
||||||
} else {
|
} else {
|
||||||
|
Settings::is_temporary_frame_limit = true;
|
||||||
Settings::temporary_frame_limit = static_cast<double>(new_value);
|
Settings::temporary_frame_limit = static_cast<double>(new_value);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user