diff options
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 13 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 4 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 13 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 2 |
4 files changed, 18 insertions, 14 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index ff05b3179..32e78049c 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -346,7 +346,7 @@ void Config::ReadValues() { | |||
| 346 | 346 | ||
| 347 | // Renderer | 347 | // Renderer |
| 348 | Settings::values.resolution_factor = | 348 | Settings::values.resolution_factor = |
| 349 | (float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0); | 349 | static_cast<float>(sdl2_config->GetReal("Renderer", "resolution_factor", 1.0)); |
| 350 | Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true); | 350 | Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true); |
| 351 | Settings::values.frame_limit = | 351 | Settings::values.frame_limit = |
| 352 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); | 352 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); |
| @@ -354,17 +354,20 @@ void Config::ReadValues() { | |||
| 354 | sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", false); | 354 | sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", false); |
| 355 | Settings::values.use_accurate_gpu_emulation = | 355 | Settings::values.use_accurate_gpu_emulation = |
| 356 | sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false); | 356 | sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false); |
| 357 | Settings::values.use_asynchronous_gpu_emulation = | ||
| 358 | sdl2_config->GetBoolean("Renderer", "use_asynchronous_gpu_emulation", false); | ||
| 357 | 359 | ||
| 358 | Settings::values.bg_red = (float)sdl2_config->GetReal("Renderer", "bg_red", 0.0); | 360 | Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0)); |
| 359 | Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0); | 361 | Settings::values.bg_green = |
| 360 | Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); | 362 | static_cast<float>(sdl2_config->GetReal("Renderer", "bg_green", 0.0)); |
| 363 | Settings::values.bg_blue = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_blue", 0.0)); | ||
| 361 | 364 | ||
| 362 | // Audio | 365 | // Audio |
| 363 | Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto"); | 366 | Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto"); |
| 364 | Settings::values.enable_audio_stretching = | 367 | Settings::values.enable_audio_stretching = |
| 365 | sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true); | 368 | sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true); |
| 366 | Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto"); | 369 | Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto"); |
| 367 | Settings::values.volume = sdl2_config->GetReal("Audio", "volume", 1); | 370 | Settings::values.volume = static_cast<float>(sdl2_config->GetReal("Audio", "volume", 1)); |
| 368 | 371 | ||
| 369 | Settings::values.language_index = sdl2_config->GetInteger("System", "language_index", 1); | 372 | Settings::values.language_index = sdl2_config->GetInteger("System", "language_index", 1); |
| 370 | 373 | ||
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index a81986f8e..6538af098 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -118,6 +118,10 @@ use_disk_shader_cache = | |||
| 118 | # 0 (default): Off (fast), 1 : On (slow) | 118 | # 0 (default): Off (fast), 1 : On (slow) |
| 119 | use_accurate_gpu_emulation = | 119 | use_accurate_gpu_emulation = |
| 120 | 120 | ||
| 121 | # Whether to use asynchronous GPU emulation | ||
| 122 | # 0 : Off (slow), 1 (default): On (fast) | ||
| 123 | use_asynchronous_gpu_emulation = | ||
| 124 | |||
| 121 | # The clear color for the renderer. What shows up on the sides of the bottom screen. | 125 | # The clear color for the renderer. What shows up on the sides of the bottom screen. |
| 122 | # Must be in range of 0.0-1.0. Defaults to 1.0 for all. | 126 | # Must be in range of 0.0-1.0. Defaults to 1.0 for all. |
| 123 | bg_red = | 127 | 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() { | |||
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | 137 | EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { |
| 138 | InputCommon::Init(); | ||
| 139 | |||
| 140 | SDL_SetMainReady(); | ||
| 141 | |||
| 142 | // Initialize the window | 138 | // Initialize the window |
| 143 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { | 139 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { |
| 144 | LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); | 140 | LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); |
| 145 | exit(1); | 141 | exit(1); |
| 146 | } | 142 | } |
| 147 | 143 | ||
| 144 | InputCommon::Init(); | ||
| 145 | |||
| 146 | SDL_SetMainReady(); | ||
| 147 | |||
| 148 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); | 148 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); |
| 149 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); | 149 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); |
| 150 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); | 150 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); |
| @@ -201,11 +201,9 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) { | |||
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | EmuWindow_SDL2::~EmuWindow_SDL2() { | 203 | EmuWindow_SDL2::~EmuWindow_SDL2() { |
| 204 | InputCommon::SDL::CloseSDLJoysticks(); | 204 | InputCommon::Shutdown(); |
| 205 | SDL_GL_DeleteContext(gl_context); | 205 | SDL_GL_DeleteContext(gl_context); |
| 206 | SDL_Quit(); | 206 | SDL_Quit(); |
| 207 | |||
| 208 | InputCommon::Shutdown(); | ||
| 209 | } | 207 | } |
| 210 | 208 | ||
| 211 | void EmuWindow_SDL2::SwapBuffers() { | 209 | void EmuWindow_SDL2::SwapBuffers() { |
| @@ -262,7 +260,6 @@ void EmuWindow_SDL2::PollEvents() { | |||
| 262 | is_open = false; | 260 | is_open = false; |
| 263 | break; | 261 | break; |
| 264 | default: | 262 | default: |
| 265 | InputCommon::SDL::HandleGameControllerEvent(event); | ||
| 266 | break; | 263 | break; |
| 267 | } | 264 | } |
| 268 | } | 265 | } |
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index c34b5467f..c6c66a787 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -216,7 +216,7 @@ int main(int argc, char** argv) { | |||
| 216 | } | 216 | } |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); | 219 | system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); |
| 220 | 220 | ||
| 221 | system.Renderer().Rasterizer().LoadDiskResources(); | 221 | system.Renderer().Rasterizer().LoadDiskResources(); |
| 222 | 222 | ||