mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
loadNibNamed:owner:topLevelObjects is available on 10.8 and newer. There is an issue report here about an app failing to function on 10.7 and earlier: https://discourse.libsdl.org/t/28179
This commit is contained in:
parent
e58cc5fa0e
commit
69fbd60d25
@ -33,6 +33,9 @@
|
|||||||
#ifndef kIOPMAssertPreventUserIdleDisplaySleep
|
#ifndef kIOPMAssertPreventUserIdleDisplaySleep
|
||||||
#define kIOPMAssertPreventUserIdleDisplaySleep kIOPMAssertionTypePreventUserIdleDisplaySleep
|
#define kIOPMAssertPreventUserIdleDisplaySleep kIOPMAssertionTypePreventUserIdleDisplaySleep
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NSAppKitVersionNumber10_8
|
||||||
|
#define NSAppKitVersionNumber10_8 1187
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface SDLApplication : NSApplication
|
@interface SDLApplication : NSApplication
|
||||||
|
|
||||||
@ -307,6 +310,9 @@ LoadMainMenuNibIfAvailable(void)
|
|||||||
NSString *mainNibFileName;
|
NSString *mainNibFileName;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
if (floor(NSAppKitVersionNumber) < NSAppKitVersionNumber10_8) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
infoDict = [[NSBundle mainBundle] infoDictionary];
|
infoDict = [[NSBundle mainBundle] infoDictionary];
|
||||||
if (infoDict) {
|
if (infoDict) {
|
||||||
mainNibFileName = [infoDict valueForKey:@"NSMainNibFile"];
|
mainNibFileName = [infoDict valueForKey:@"NSMainNibFile"];
|
||||||
|
Loading…
Reference in New Issue
Block a user