diff options
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r-- | src/yuzu_cmd/config.cpp | 5 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 5 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 13 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.h | 3 | ||||
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 4 |
5 files changed, 28 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index d82438502..1a812cb87 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -433,6 +433,11 @@ void Config::ReadValues() { sdl2_config->Get("WebService", "web_api_url", "https://api.yuzu-emu.org"); Settings::values.yuzu_username = sdl2_config->Get("WebService", "yuzu_username", ""); Settings::values.yuzu_token = sdl2_config->Get("WebService", "yuzu_token", ""); + + // Services + Settings::values.bcat_backend = sdl2_config->Get("Services", "bcat_backend", "boxcat"); + Settings::values.bcat_boxcat_local = + sdl2_config->GetBoolean("Services", "bcat_boxcat_local", false); } void Config::Reload() { diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index a6171c3ed..8d18a4a5a 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -251,6 +251,11 @@ web_api_url = https://api.yuzu-emu.org yuzu_username = yuzu_token = +[Services] +# The name of the backend to use for BCAT +# If this is set to 'boxcat' boxcat will be used, otherwise a null implementation will be used +bcat_backend = + [AddOns] # Used to disable add-ons # List of title IDs of games that will have add-ons disabled (separated by '|'): diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index a6edc089a..b1c512db1 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -4,6 +4,9 @@ #include <SDL.h> #include "common/logging/log.h" +#include "common/scm_rev.h" +#include "core/core.h" +#include "core/perf_stats.h" #include "input_common/keyboard.h" #include "input_common/main.h" #include "input_common/motion_emu.h" @@ -170,6 +173,16 @@ void EmuWindow_SDL2::PollEvents() { break; } } + + const u32 current_time = SDL_GetTicks(); + if (current_time > last_time + 2000) { + const auto results = Core::System::GetInstance().GetAndResetPerfStats(); + const auto title = fmt::format( + "yuzu {} | {}-{} | FPS: {:.0f} ({:.0%})", Common::g_build_fullname, + Common::g_scm_branch, Common::g_scm_desc, results.game_fps, results.emulation_speed); + SDL_SetWindowTitle(render_window, title.c_str()); + last_time = current_time; + } } void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) { diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h index d8051ebdf..eaa971f77 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h @@ -60,4 +60,7 @@ protected: /// Internal SDL2 render window SDL_Window* render_window; + + /// Keeps track of how often to update the title bar during gameplay + u32 last_time = 0; }; diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index bac05b959..3ee088a91 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -186,8 +186,6 @@ int main(int argc, char** argv) { system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>()); system.GetFileSystemController().CreateFactories(*system.GetFilesystem()); - SCOPE_EXIT({ system.Shutdown(); }); - const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)}; switch (load_result) { @@ -227,6 +225,8 @@ int main(int argc, char** argv) { system.RunLoop(); } + system.Shutdown(); + detached_tasks.WaitForAllTasks(); return 0; } |