diff options
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r-- | src/yuzu_cmd/config.cpp | 15 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 8 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 13 | ||||
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 9 |
4 files changed, 29 insertions, 16 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 7a77f76e8..32e78049c 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -346,23 +346,28 @@ void Config::ReadValues() { // Renderer Settings::values.resolution_factor = - (float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0); + static_cast<float>(sdl2_config->GetReal("Renderer", "resolution_factor", 1.0)); Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true); Settings::values.frame_limit = static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); + Settings::values.use_disk_shader_cache = + sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", false); Settings::values.use_accurate_gpu_emulation = sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false); + Settings::values.use_asynchronous_gpu_emulation = + sdl2_config->GetBoolean("Renderer", "use_asynchronous_gpu_emulation", false); - Settings::values.bg_red = (float)sdl2_config->GetReal("Renderer", "bg_red", 0.0); - Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0); - Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); + Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0)); + Settings::values.bg_green = + static_cast<float>(sdl2_config->GetReal("Renderer", "bg_green", 0.0)); + Settings::values.bg_blue = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_blue", 0.0)); // Audio Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto"); Settings::values.enable_audio_stretching = sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true); Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto"); - Settings::values.volume = sdl2_config->GetReal("Audio", "volume", 1); + Settings::values.volume = static_cast<float>(sdl2_config->GetReal("Audio", "volume", 1)); Settings::values.language_index = sdl2_config->GetInteger("System", "language_index", 1); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index ba51a4a51..6538af098 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -110,10 +110,18 @@ use_frame_limit = # 1 - 9999: Speed limit as a percentage of target game speed. 100 (default) frame_limit = +# Whether to use disk based shader cache +# 0 (default): Off, 1 : On +use_disk_shader_cache = + # Whether to use accurate GPU emulation # 0 (default): Off (fast), 1 : On (slow) use_accurate_gpu_emulation = +# Whether to use asynchronous GPU emulation +# 0 : Off (slow), 1 (default): On (fast) +use_asynchronous_gpu_emulation = + # The clear color for the renderer. What shows up on the sides of the bottom screen. # Must be in range of 0.0-1.0. Defaults to 1.0 for all. bg_red = diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 7df8eff53..de7a26e14 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -135,16 +135,16 @@ bool EmuWindow_SDL2::SupportsRequiredGLExtensions() { } EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { - InputCommon::Init(); - - SDL_SetMainReady(); - // Initialize the window if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); exit(1); } + InputCommon::Init(); + + SDL_SetMainReady(); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); @@ -201,11 +201,9 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { } EmuWindow_SDL2::~EmuWindow_SDL2() { - InputCommon::SDL::CloseSDLJoysticks(); + InputCommon::Shutdown(); SDL_GL_DeleteContext(gl_context); SDL_Quit(); - - InputCommon::Shutdown(); } void EmuWindow_SDL2::SwapBuffers() { @@ -262,7 +260,6 @@ void EmuWindow_SDL2::PollEvents() { is_open = false; break; default: - InputCommon::SDL::HandleGameControllerEvent(event); break; } } diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 806127b12..245f25847 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -28,6 +28,7 @@ #include "core/loader/loader.h" #include "core/settings.h" #include "core/telemetry_session.h" +#include "video_core/renderer_base.h" #include "yuzu_cmd/config.h" #include "yuzu_cmd/emu_window/emu_window_sdl2.h" @@ -113,9 +114,9 @@ int main(int argc, char** argv) { }; while (optind < argc) { - char arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index); + int arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index); if (arg != -1) { - switch (arg) { + switch (static_cast<char>(arg)) { case 'g': errno = 0; gdb_port = strtoul(optarg, &endarg, 0); @@ -215,7 +216,9 @@ int main(int argc, char** argv) { } } - Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); + system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); + + system.Renderer().Rasterizer().LoadDiskResources(); while (emu_window->IsOpen()) { system.RunLoop(); |