mirror of https://github.com/PCSX2/pcsx2.git
GSdx: Fix OpenCL detection.
Fixes an issue when the plugin detects an opencl ini value for the render. It used to throw a "GS plugin failed to load" error when opencl was disabled but the ini value remained the same. The render will fallback to D3D11 now.
This commit is contained in:
parent
b3006e2a6a
commit
d5bd5db072
|
@ -336,10 +336,12 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
||||||
case GSRendererType::Null:
|
case GSRendererType::Null:
|
||||||
renderer_mode = "(Null renderer)";
|
renderer_mode = "(Null renderer)";
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_OPENCL
|
||||||
case GSRendererType::DX1011_OpenCL:
|
case GSRendererType::DX1011_OpenCL:
|
||||||
case GSRendererType::OGL_OpenCL:
|
case GSRendererType::OGL_OpenCL:
|
||||||
renderer_mode = "(OpenCL)";
|
renderer_mode = "(OpenCL)";
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
renderer_mode = "(Hardware renderer)";
|
renderer_mode = "(Hardware renderer)";
|
||||||
break;
|
break;
|
||||||
|
@ -402,15 +404,13 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
||||||
s_gs = new GSRendererNull();
|
s_gs = new GSRendererNull();
|
||||||
s_renderer_type = "";
|
s_renderer_type = "";
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_OPENCL
|
||||||
case GSRendererType::DX1011_OpenCL:
|
case GSRendererType::DX1011_OpenCL:
|
||||||
case GSRendererType::OGL_OpenCL:
|
case GSRendererType::OGL_OpenCL:
|
||||||
#ifdef ENABLE_OPENCL
|
|
||||||
s_gs = new GSRendererCL();
|
s_gs = new GSRendererCL();
|
||||||
s_renderer_type = " OCL";
|
s_renderer_type = " OCL";
|
||||||
#else
|
|
||||||
printf("GSdx error: OpenCL is disabled\n");
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (s_gs == NULL)
|
if (s_gs == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue