diff options
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 7 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h | 2 |
5 files changed, 15 insertions, 9 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 80341747f..8476a5a16 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -388,12 +388,14 @@ void Config::ReadValues() { | |||
| 388 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); | 388 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); |
| 389 | Settings::values.use_disk_shader_cache = | 389 | Settings::values.use_disk_shader_cache = |
| 390 | sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", false); | 390 | sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", false); |
| 391 | Settings::values.use_accurate_gpu_emulation = | 391 | const int gpu_accuracy_level = sdl2_config->GetInteger("Renderer", "gpu_accuracy", 0); |
| 392 | sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false); | 392 | Settings::values.gpu_accuracy = static_cast<Settings::GPUAccuracy>(gpu_accuracy_level); |
| 393 | Settings::values.use_asynchronous_gpu_emulation = | 393 | Settings::values.use_asynchronous_gpu_emulation = |
| 394 | sdl2_config->GetBoolean("Renderer", "use_asynchronous_gpu_emulation", false); | 394 | sdl2_config->GetBoolean("Renderer", "use_asynchronous_gpu_emulation", false); |
| 395 | Settings::values.use_vsync = | 395 | Settings::values.use_vsync = |
| 396 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "use_vsync", 1)); | 396 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "use_vsync", 1)); |
| 397 | Settings::values.use_fast_gpu_time = | ||
| 398 | sdl2_config->GetBoolean("Renderer", "use_fast_gpu_time", true); | ||
| 397 | 399 | ||
| 398 | Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0)); | 400 | Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0)); |
| 399 | Settings::values.bg_green = | 401 | Settings::values.bg_green = |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 171d16fa0..60b1a62fa 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -146,9 +146,9 @@ frame_limit = | |||
| 146 | # 0 (default): Off, 1 : On | 146 | # 0 (default): Off, 1 : On |
| 147 | use_disk_shader_cache = | 147 | use_disk_shader_cache = |
| 148 | 148 | ||
| 149 | # Whether to use accurate GPU emulation | 149 | # Which gpu accuracy level to use |
| 150 | # 0 (default): Off (fast), 1 : On (slow) | 150 | # 0 (Normal), 1 (High), 2 (Extreme) |
| 151 | use_accurate_gpu_emulation = | 151 | gpu_accuracy = |
| 152 | 152 | ||
| 153 | # Whether to use asynchronous GPU emulation | 153 | # Whether to use asynchronous GPU emulation |
| 154 | # 0 : Off (slow), 1 (default): On (fast) | 154 | # 0 : Off (slow), 1 (default): On (fast) |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 19584360c..e5e684206 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -181,9 +181,10 @@ void EmuWindow_SDL2::PollEvents() { | |||
| 181 | const u32 current_time = SDL_GetTicks(); | 181 | const u32 current_time = SDL_GetTicks(); |
| 182 | if (current_time > last_time + 2000) { | 182 | if (current_time > last_time + 2000) { |
| 183 | const auto results = Core::System::GetInstance().GetAndResetPerfStats(); | 183 | const auto results = Core::System::GetInstance().GetAndResetPerfStats(); |
| 184 | const auto title = fmt::format( | 184 | const auto title = |
| 185 | "yuzu {} | {}-{} | FPS: {:.0f} ({:.0%})", Common::g_build_fullname, | 185 | fmt::format("yuzu {} | {}-{} | FPS: {:.0f} ({:.0f}%)", Common::g_build_fullname, |
| 186 | Common::g_scm_branch, Common::g_scm_desc, results.game_fps, results.emulation_speed); | 186 | Common::g_scm_branch, Common::g_scm_desc, results.game_fps, |
| 187 | results.emulation_speed * 100.0); | ||
| 187 | SDL_SetWindowTitle(render_window, title.c_str()); | 188 | SDL_SetWindowTitle(render_window, title.c_str()); |
| 188 | last_time = current_time; | 189 | last_time = current_time; |
| 189 | } | 190 | } |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index f2990910e..cb8e68a39 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | |||
| @@ -29,6 +29,7 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(Core::System& system, bool fullscreen) | |||
| 29 | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); | 29 | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); |
| 30 | 30 | ||
| 31 | SDL_SysWMinfo wm; | 31 | SDL_SysWMinfo wm; |
| 32 | SDL_VERSION(&wm.version); | ||
| 32 | if (SDL_GetWindowWMInfo(render_window, &wm) == SDL_FALSE) { | 33 | if (SDL_GetWindowWMInfo(render_window, &wm) == SDL_FALSE) { |
| 33 | LOG_CRITICAL(Frontend, "Failed to get information from the window manager"); | 34 | LOG_CRITICAL(Frontend, "Failed to get information from the window manager"); |
| 34 | std::exit(EXIT_FAILURE); | 35 | std::exit(EXIT_FAILURE); |
| @@ -70,7 +71,7 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(Core::System& system, bool fullscreen) | |||
| 70 | EmuWindow_SDL2_VK::~EmuWindow_SDL2_VK() = default; | 71 | EmuWindow_SDL2_VK::~EmuWindow_SDL2_VK() = default; |
| 71 | 72 | ||
| 72 | std::unique_ptr<Core::Frontend::GraphicsContext> EmuWindow_SDL2_VK::CreateSharedContext() const { | 73 | std::unique_ptr<Core::Frontend::GraphicsContext> EmuWindow_SDL2_VK::CreateSharedContext() const { |
| 73 | return nullptr; | 74 | return std::make_unique<DummyContext>(); |
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | void EmuWindow_SDL2_VK::Present() { | 77 | void EmuWindow_SDL2_VK::Present() { |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h index b8021ebea..77a6ca72b 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h | |||
| @@ -22,3 +22,5 @@ public: | |||
| 22 | 22 | ||
| 23 | std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override; | 23 | std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override; |
| 24 | }; | 24 | }; |
| 25 | |||
| 26 | class DummyContext : public Core::Frontend::GraphicsContext {}; | ||