mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-29 20:27:12 +01:00
(Also see: https://bugzilla.libsdl.org/show_bug.cgi?id=4822) Building the current tree against 10.8 SDK, clang emits the following warning: src/video/cocoa/SDL_cocoawindow.m:1846:27: warning: instance method '-isOperatingSystemAtLeastVersion:' not found (return type defaults to 'id') [-Wobjc-method-access] ![processInfo isOperatingSystemAtLeastVersion:version]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSProcessInfo.h:20:12: note: receiver is instance of class declared here @interface NSProcessInfo : NSObject { ^ 1 warning generated. isOperatingSystemAtLeastVersion is an 10.10 thing.
This commit is contained in:
parent
69fbd60d25
commit
19aaa2944d
@ -57,6 +57,9 @@
|
|||||||
#ifndef MAC_OS_X_VERSION_10_12
|
#ifndef MAC_OS_X_VERSION_10_12
|
||||||
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NSAppKitVersionNumber10_14
|
||||||
|
#define NSAppKitVersionNumber10_14 1671
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface SDLWindow : NSWindow <NSDraggingDestination>
|
@interface SDLWindow : NSWindow <NSDraggingDestination>
|
||||||
/* These are needed for borderless/fullscreen windows */
|
/* These are needed for borderless/fullscreen windows */
|
||||||
@ -1833,17 +1836,7 @@ 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.
|
||||||
*/
|
*/
|
||||||
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
|
if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_14) {
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 /* NSOperatingSystemVersion added in the 10.10 SDK */
|
|
||||||
typedef struct {
|
|
||||||
NSInteger majorVersion;
|
|
||||||
NSInteger minorVersion;
|
|
||||||
NSInteger patchVersion;
|
|
||||||
} NSOperatingSystemVersion;
|
|
||||||
#endif
|
|
||||||
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