Removed OS X version check

It didn't work correctly and .plist should set minimum OS version to run on
This commit is contained in:
alexey.lysiuk 2014-11-09 16:49:26 +02:00
parent a40eb3443b
commit 70bb80e2bf

View file

@ -1955,39 +1955,8 @@ int SDL_SetPalette(SDL_Surface* surface, int flags, SDL_Color* colors, int first
#undef main #undef main
#endif // main #endif // main
static void CheckOSVersion()
{
static const char* const PARAMETER_NAME = "kern.osrelease";
size_t size = 0;
if (-1 == sysctlbyname(PARAMETER_NAME, NULL, &size, NULL, 0))
{
return;
}
char* version = static_cast<char* >(alloca(size));
if (-1 == sysctlbyname(PARAMETER_NAME, version, &size, NULL, 0))
{
return;
}
if (strcmp(version, "10.0") < 0)
{
CFOptionFlags responseFlags;
CFUserNotificationDisplayAlert(0, kCFUserNotificationStopAlertLevel, NULL, NULL, NULL,
CFSTR("Unsupported version of OS X"), CFSTR("You need OS X 10.6 or higher running on Intel platform in order to play."),
NULL, NULL, NULL, &responseFlags);
exit(EXIT_FAILURE);
}
}
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
CheckOSVersion();
gettimeofday(&s_startTicks, NULL); gettimeofday(&s_startTicks, NULL);
for (int i = 0; i <= argc; ++i) for (int i = 0; i <= argc; ++i)