From d5bd5db0724716ebb00e94a15ab200e76692124a Mon Sep 17 00:00:00 2001 From: lightningterror Date: Wed, 26 Dec 2018 05:13:15 +0100 Subject: [PATCH] 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. --- plugins/GSdx/GS.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index cdaa58411b..5ed1224314 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -336,10 +336,12 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t case GSRendererType::Null: renderer_mode = "(Null renderer)"; break; +#ifdef ENABLE_OPENCL case GSRendererType::DX1011_OpenCL: case GSRendererType::OGL_OpenCL: renderer_mode = "(OpenCL)"; break; +#endif default: renderer_mode = "(Hardware renderer)"; break; @@ -402,15 +404,13 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t s_gs = new GSRendererNull(); s_renderer_type = ""; break; +#ifdef ENABLE_OPENCL case GSRendererType::DX1011_OpenCL: case GSRendererType::OGL_OpenCL: -#ifdef ENABLE_OPENCL s_gs = new GSRendererCL(); s_renderer_type = " OCL"; -#else - printf("GSdx error: OpenCL is disabled\n"); -#endif break; +#endif } if (s_gs == NULL) return -1;