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.

This commit is contained in:
Ryan Houdek 2013-03-14 15:25:41 -05:00
parent e63a5d8529
commit db1fc9019b
2 changed files with 18 additions and 1 deletions

View file

@ -50,6 +50,10 @@
#include <shellapi.h>
#endif
#ifdef __APPLE__
#include <CarbonCore/OSUtils.h>
#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())))

View file

@ -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