From d40ce3f1e5e09e7ca94b32a16962a88a96c24576 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 20 Oct 2009 02:11:50 +0000 Subject: [PATCH] fix compiling if opencl is not enabled at compile time git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4440 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/OpenCL.cpp | 2 ++ Source/Core/Common/Src/OpenCL.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/Src/OpenCL.cpp b/Source/Core/Common/Src/OpenCL.cpp index 7ed4c39349..c3ff939ab0 100644 --- a/Source/Core/Common/Src/OpenCL.cpp +++ b/Source/Core/Common/Src/OpenCL.cpp @@ -130,6 +130,7 @@ void Destroy() { #endif } +#if defined(HAVE_OPENCL) && HAVE_OPENCL void HandleCLError(cl_int error, char* str) { char* name; @@ -191,5 +192,6 @@ void HandleCLError(cl_int error, char* str) PanicAlert("OpenCL error: %s %s (%d)", str, name, error); } +#endif }; diff --git a/Source/Core/Common/Src/OpenCL.h b/Source/Core/Common/Src/OpenCL.h index 6e63ccb1e6..12baade12c 100644 --- a/Source/Core/Common/Src/OpenCL.h +++ b/Source/Core/Common/Src/OpenCL.h @@ -60,8 +60,10 @@ void Destroy(); cl_program CompileProgram(const char *Kernel); cl_kernel CompileKernel(cl_program program, const char *Function); -void HandleCLError(cl_int error, char* str = 0); +#if defined(HAVE_OPENCL) && HAVE_OPENCL +void HandleCLError(cl_int error, char* str = 0); +#endif }; #endif