From b44200207134a477f7d4b4bd1a425cddad90e82b Mon Sep 17 00:00:00 2001 From: OV2 Date: Fri, 9 Sep 2011 23:52:35 +0200 Subject: [PATCH] Win32: only display cg error message if shader file has been set --- win32/COpenGL.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/win32/COpenGL.cpp b/win32/COpenGL.cpp index 28d1466a..c5beb828 100644 --- a/win32/COpenGL.cpp +++ b/win32/COpenGL.cpp @@ -716,8 +716,9 @@ void COpenGL::checkForCgError(const char *situation) bool COpenGL::SetShadersCG(const TCHAR *file) { if(!cgAvailable) { - MessageBox(NULL, TEXT("The CG runtime is unavailable, CG shaders will not run.\nConsult the snes9x readme for information on how to obtain the runtime."), TEXT("CG Error"), - MB_OK|MB_ICONEXCLAMATION); + if(file) + MessageBox(NULL, TEXT("The CG runtime is unavailable, CG shaders will not run.\nConsult the snes9x readme for information on how to obtain the runtime."), TEXT("CG Error"), + MB_OK|MB_ICONEXCLAMATION); return false; }