From 2b662da26a49b115b3d1022ff941be2ce6ac331d Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 16 Jun 2021 21:03:37 +0200 Subject: [PATCH] early-access version 1790 --- README.md | 2 +- src/common/settings.h | 1 + src/core/hle/service/filesystem/fsp_srv.cpp | 2 +- src/core/hle/service/nvflinger/nvflinger.cpp | 3 +++ src/core/reporter.cpp | 2 +- src/core/reporter.h | 2 +- src/yuzu/configuration/config.cpp | 2 ++ src/yuzu/configuration/configure_debug.cpp | 2 ++ src/yuzu/configuration/configure_debug.ui | 18 ++++++++++++++++++ src/yuzu_cmd/config.cpp | 1 + src/yuzu_cmd/default_ini.h | 3 +++ 11 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bacd15122..df1752ff8 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1789. +This is the source code for early-access 1790. ## Legal Notice diff --git a/src/common/settings.h b/src/common/settings.h index a1c0bf3ad..265a2f12d 100755 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -224,6 +224,7 @@ struct Values { bool reporting_services; bool quest_flag; bool disable_macro_jit; + bool unlimit_fps; bool extended_logging; bool use_debug_asserts; bool use_auto_stub; diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 0f8dd1852..db4d44c12 100755 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -1069,7 +1069,7 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_FS, "called"); - reporter.SaveFSAccessLog(std::move(log)); + reporter.SaveFSAccessLog(log); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index d1dbc659b..f87627832 100755 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -307,6 +307,9 @@ void NVFlinger::Compose() { } s64 NVFlinger::GetNextTicks() const { + if (Settings::values.unlimit_fps) { + return 0; + } constexpr s64 max_hertz = 120LL; return (1000000000 * (1LL << swap_interval)) / max_hertz; } diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index d1fb2f622..82b0f535a 100755 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp @@ -364,7 +364,7 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result, SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); } -void Reporter::SaveFSAccessLog(std::string log_message) const { +void Reporter::SaveFSAccessLog(std::string_view log_message) const { const auto access_log_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt"; diff --git a/src/core/reporter.h b/src/core/reporter.h index 4909bbccc..6e9edeea3 100755 --- a/src/core/reporter.h +++ b/src/core/reporter.h @@ -65,7 +65,7 @@ public: std::optional custom_text_main = {}, std::optional custom_text_detail = {}) const; - void SaveFSAccessLog(std::string log_message) const; + void SaveFSAccessLog(std::string_view log_message) const; // Can be used anywhere to generate a backtrace and general info report at any point during // execution. Not intended to be used for anything other than debugging or testing. diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 57843ac5a..d5acf6c3a 100755 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -654,6 +654,7 @@ void Config::ReadDebuggingValues() { Settings::values.quest_flag = ReadSetting(QStringLiteral("quest_flag"), false).toBool(); Settings::values.disable_macro_jit = ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); + Settings::values.unlimit_fps = ReadSetting(QStringLiteral("unlimit_fps"), false).toBool(); Settings::values.extended_logging = ReadSetting(QStringLiteral("extended_logging"), false).toBool(); Settings::values.use_debug_asserts = @@ -1267,6 +1268,7 @@ void Config::SaveDebuggingValues() { WriteSetting(QStringLiteral("quest_flag"), Settings::values.quest_flag, false); WriteSetting(QStringLiteral("use_debug_asserts"), Settings::values.use_debug_asserts, false); WriteSetting(QStringLiteral("disable_macro_jit"), Settings::values.disable_macro_jit, false); + WriteSetting(QStringLiteral("unlimit_fps"), Settings::values.unlimit_fps, false); qt_config->endGroup(); } diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 15d6a5ad7..a5472a89a 100755 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -44,6 +44,7 @@ void ConfigureDebug::SetConfiguration() { ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); ui->disable_macro_jit->setEnabled(runtime_lock); ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit); + ui->unlimit_fps->setChecked(Settings::values.unlimit_fps); ui->extended_logging->setChecked(Settings::values.extended_logging); } @@ -58,6 +59,7 @@ void ConfigureDebug::ApplyConfiguration() { Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); + Settings::values.unlimit_fps = ui->unlimit_fps->isChecked(); Settings::values.extended_logging = ui->extended_logging->isChecked(); Debugger::ToggleConsole(); Common::Log::Filter filter; diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index c8087542f..a9a8fe942 100755 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -138,6 +138,24 @@ + + + + true + + + + <html><head/><body> + <p>Presents guest frames as they become available, disabling the fps limit in most titles.</p> + <p>NOTE: Will cause instabilities.</p> + </body></html> + + + + Unlimit Framerate (Experimental) + + + diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 621b31571..1b2df6cef 100755 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -490,6 +490,7 @@ void Config::ReadValues() { Settings::values.disable_macro_jit = sdl2_config->GetBoolean("Debugging", "disable_macro_jit", false); + Settings::values.unlimit_fps = sdl2_config->GetBoolean("Debugging", "unlimit_fps", false); const auto title_list = sdl2_config->Get("AddOns", "title_ids", ""); std::stringstream ss(title_list); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 61292ba84..38d0d00ac 100755 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -366,6 +366,9 @@ use_debug_asserts = use_auto_stub = # Enables/Disables the macro JIT compiler disable_macro_jit=false +# Presents guest frames as they become available. Experimental. +# false: Disabled (default), true: Enabled +unlimit_fps=false [WebService] # Whether or not to enable telemetry