From db1fc9019b37ca770b8febeb19ba1c551ce16bc6 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 14 Mar 2013 15:25:41 -0500 Subject: [PATCH] Add a OSX version check to GLSL so if anyone running < OSX 10.7 gets a message instead of crashing when running the game. Turn off DEBUG_GLSL. --- Source/Core/DolphinWX/Src/Main.cpp | 17 +++++++++++++++++ Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 37311c84bf..d7bc40a149 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -50,6 +50,10 @@ #include #endif +#ifdef __APPLE__ +#include +#endif + // Nvidia drivers >= v302 will check if the application exports a global // variable named NvOptimusEnablement to know if it should run the app in high // performance graphics mode or using the IGP. @@ -212,6 +216,19 @@ bool DolphinApp::OnInit() return false; } #endif +#ifdef __APPLE__ + SInt32 versMaj, versMin; + Gestalt(gestaltSystemVersionMajor, &versMaj); + Gestalt(gestaltSystemVersionMinor, &versMin); + if (!(versMaj >= 10 && versMin >= 7)) + { + PanicAlertT("Hi,\n\nDolphin requires OS X 10.7 or greater.\n" + "Unfortunately you're running an old version of OS X.\n" + "Please upgrade to 10.7 or greater to use Dolphin.\n\n" + "Sayonara!\n"); + return false; + } +#endif #ifdef _WIN32 if (!wxSetWorkingDirectory(StrToWxStr(File::GetExeDirectory()))) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h index 9cd8ff9093..419e7d5a43 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h @@ -70,7 +70,7 @@ bool OpenGL_ReportFBOError(const char *function, const char *file, int line); #endif // this should be removed in future, but as long as glsl is unstable, we should really read this messages -#if defined(_DEBUG) || defined(DEBUGFAST) || 1 +#if defined(_DEBUG) || defined(DEBUGFAST) #define DEBUG_GLSL 1 #else #define DEBUG_GLSL 0