diff options
author | culler <culler> | 2020-06-25 21:12:33 (GMT) |
---|---|---|
committer | culler <culler> | 2020-06-25 21:12:33 (GMT) |
commit | 89f5a6802f0e3aa56d0f612913683dc432646bd0 (patch) | |
tree | 3b069fa04d7791d8c0a83a4c2b35d2719a2d4fd0 /macosx/tkMacOSXInit.c | |
parent | dc7625ccd3a00dba6a55b37c190b2cae3b58ea4f (diff) | |
download | tk-89f5a6802f0e3aa56d0f612913683dc432646bd0.zip tk-89f5a6802f0e3aa56d0f612913683dc432646bd0.tar.gz tk-89f5a6802f0e3aa56d0f612913683dc432646bd0.tar.bz2 |
Aqua: replace [NSApp macMinorVersion] by [NSApp macOSVersion] event though the Big Sur (11.1) beta release identifies itself as 10.16.
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r-- | macosx/tkMacOSXInit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index e806b24..ab5b2ec 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -32,7 +32,7 @@ static char scriptPath[PATH_MAX + 1] = ""; @implementation TKApplication @synthesize poolLock = _poolLock; -@synthesize macMinorVersion = _macMinorVersion; +@synthesize macOSVersion = _macOSVersion; @synthesize isDrawing = _isDrawing; @end @@ -154,15 +154,19 @@ static char scriptPath[PATH_MAX + 1] = ""; /* * Record the OS version we are running on. */ - int minorVersion; + + int minorVersion, majorVersion; #if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 Gestalt(gestaltSystemVersionMinor, (SInt32*)&minorVersion); + majorVersion = 10; #else NSOperatingSystemVersion systemVersion; systemVersion = [[NSProcessInfo processInfo] operatingSystemVersion]; + majorVersion = systemVersion.majorVersion; minorVersion = systemVersion.minorVersion; #endif - [NSApp setMacMinorVersion: minorVersion]; + printf("Major: %d; Minor: %d\n", majorVersion, minorVersion); + [NSApp setMacOSVersion: 10000*majorVersion + 100*minorVersion]; /* * We are not drawing right now. |