diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index 4aadf0583..6b12b9012 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -513,7 +513,7 @@ void HostInterface::SetDefaultSettings() m_settings.speed_limiter_enabled = true; m_settings.start_paused = false; - m_settings.gpu_renderer = GPURenderer::HardwareOpenGL; + m_settings.gpu_renderer = Settings::DEFAULT_GPU_RENDERER; m_settings.gpu_resolution_scale = 1; m_settings.gpu_true_color = true; m_settings.gpu_texture_filtering = false; diff --git a/src/core/settings.cpp b/src/core/settings.cpp index b65747e05..0c2e76595 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -16,8 +16,8 @@ void Settings::Load(SettingsInterface& si) cpu_execution_mode = ParseCPUExecutionMode(si.GetStringValue("CPU", "ExecutionMode", "Interpreter").c_str()) .value_or(CPUExecutionMode::Interpreter); - gpu_renderer = - ParseRendererName(si.GetStringValue("GPU", "Renderer", "OpenGL").c_str()).value_or(GPURenderer::HardwareOpenGL); + gpu_renderer = ParseRendererName(si.GetStringValue("GPU", "Renderer", GetRendererName(DEFAULT_GPU_RENDERER)).c_str()) + .value_or(DEFAULT_GPU_RENDERER); gpu_resolution_scale = static_cast(si.GetIntValue("GPU", "ResolutionScale", 1)); gpu_true_color = si.GetBoolValue("GPU", "TrueColor", false); gpu_texture_filtering = si.GetBoolValue("GPU", "TextureFiltering", false); diff --git a/src/core/settings.h b/src/core/settings.h index 5c1b75b90..3ff7d2191 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -98,4 +98,11 @@ struct Settings static std::optional ParseControllerTypeName(const char* str); static const char* GetControllerTypeName(ControllerType type); static const char* GetControllerTypeDisplayName(ControllerType type); + + // Default to D3D11 on Windows as it's more performant and at this point, less buggy. +#ifdef WIN32 + static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareD3D11; +#else + static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareOpenGL; +#endif };