GSdx: better default renderer selection. Thanks, Gregory :)

This commit is contained in:
ramapcsx2 2015-12-20 16:03:58 +01:00
parent 16231f599b
commit 9092be3a52
2 changed files with 7 additions and 2 deletions

View File

@ -496,7 +496,12 @@ EXPORT_C_(int) GSopen2(void** dsp, uint32 flags)
// Fresh start up or config file changed // Fresh start up or config file changed
if (renderer == GSRendererType::Undefined) if (renderer == GSRendererType::Undefined)
{ {
renderer = static_cast<GSRendererType>(theApp.GetConfig("Renderer", static_cast<int>(GSRendererType::Default))); #ifdef _WIN32
GSRendererType default_renderer = GSUtil::CheckDirect3D11Level() >= D3D_FEATURE_LEVEL_10_0 ? GSRendererType::DX1011_HW : GSRendererType::DX9_HW;
#else
GSRendererType default_renderer = GSRendererType::Default;
#endif
renderer = static_cast<GSRendererType>(theApp.GetConfig("Renderer", static_cast<int>(default_renderer)));
} }
else if (stored_toggle_state != toggle_state) else if (stored_toggle_state != toggle_state)
{ {

View File

@ -240,7 +240,7 @@ enum class GSRendererType : int8_t
OGL_OpenCL = 17, OGL_OpenCL = 17,
#ifdef _WINDOWS #ifdef _WINDOWS
Default = DX1011_HW Default = DX9_HW
#else #else
// Use ogl renderer as default otherwise it crash at startup // Use ogl renderer as default otherwise it crash at startup
// GSRenderOGL only GSDeviceOGL (not GSDeviceNULL) // GSRenderOGL only GSDeviceOGL (not GSDeviceNULL)