mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Attempt to make version detection safe for Mac OS X < 10.10
This commit is contained in:
parent
52b410ab8e
commit
fe8ce66b53
@ -1796,8 +1796,10 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
|
|||||||
/* Hack to fix origin on Mac OS X 10.4
|
/* Hack to fix origin on Mac OS X 10.4
|
||||||
This is no longer needed as of Mac OS X 10.15, according to bug 4822.
|
This is no longer needed as of Mac OS X 10.15, according to bug 4822.
|
||||||
*/
|
*/
|
||||||
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
||||||
if ((version.majorVersion == 10) && (version.minorVersion < 15)) {
|
NSOperatingSystemVersion version = { 10, 15, 0 };
|
||||||
|
if (![processInfo respondsToSelector:@selector(isOperatingSystemAtLeastVersion:)] ||
|
||||||
|
![processInfo isOperatingSystemAtLeastVersion:version]) {
|
||||||
NSRect screenRect = [[nswindow screen] frame];
|
NSRect screenRect = [[nswindow screen] frame];
|
||||||
if (screenRect.size.height >= 1.0f) {
|
if (screenRect.size.height >= 1.0f) {
|
||||||
rect.origin.y += (screenRect.size.height - rect.size.height);
|
rect.origin.y += (screenRect.size.height - rect.size.height);
|
||||||
|
Loading…
Reference in New Issue
Block a user