author | peter1138 |
Sun, 03 Aug 2008 17:35:08 +0000 | |
changeset 9834 | 7474149531c1 |
parent 9757 | 136e5c488baa |
permissions | -rw-r--r-- |
5941
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
1 |
/* $Id$ */ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
2 |
|
7965
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
3 |
#include <AvailabilityMacros.h> |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
4 |
|
5941
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
5 |
#include <AppKit/AppKit.h> |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
6 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
7 |
#include <mach/mach.h> |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
8 |
#include <mach/mach_host.h> |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
9 |
#include <mach/host_info.h> |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
10 |
#include <mach/machine.h> |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
11 |
#include <stdio.h> |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
12 |
#include "../../stdafx.h" |
8117
c8c2b8ae0b2f
(svn r11678) -Fix (r11674): [OSX] fixed compilation
bjarni
parents:
7986
diff
changeset
|
13 |
#include "../../core/bitmath_func.hpp" |
9085
8b3897a75aed
(svn r12944) -Codechange: use rev.h instead of externs at many places
smatz
parents:
8117
diff
changeset
|
14 |
#include "../../rev.h" |
5941
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
15 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
16 |
#ifndef CPU_SUBTYPE_POWERPC_970 |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
17 |
#define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
18 |
#endif |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
19 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
20 |
/* |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
21 |
* This file contains objective C |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
22 |
* Apple uses objective C instead of plain C to interact with OS specific/native functions |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
23 |
* |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
24 |
* Note: TrueLight's crosscompiler can handle this, but it likely needs a manual modification for each change in this file. |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
25 |
* To insure that the crosscompiler still works, let him try any changes before they are committed |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
26 |
*/ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
27 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
28 |
void ToggleFullScreen(bool fs); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
29 |
|
6247 | 30 |
static char *GetOSString() |
5941
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
31 |
{ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
32 |
static char buffer[175]; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
33 |
const char* CPU; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
34 |
char OS[20]; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
35 |
char newgrf[125]; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
36 |
long sysVersion; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
37 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
38 |
// get the hardware info |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
39 |
host_basic_info_data_t hostInfo; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
40 |
mach_msg_type_number_t infoCount; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
41 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
42 |
infoCount = HOST_BASIC_INFO_COUNT; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
43 |
host_info( |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
44 |
mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostInfo, &infoCount |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
45 |
); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
46 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
47 |
// replace the hardware info with strings, that tells a bit more than just an int |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
48 |
switch (hostInfo.cpu_subtype) { |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
49 |
#ifdef __POWERPC__ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
50 |
case CPU_SUBTYPE_POWERPC_750: CPU = "G3"; break; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
51 |
case CPU_SUBTYPE_POWERPC_7400: |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
52 |
case CPU_SUBTYPE_POWERPC_7450: CPU = "G4"; break; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
53 |
case CPU_SUBTYPE_POWERPC_970: CPU = "G5"; break; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
54 |
default: CPU = "Unknown PPC"; break; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
55 |
#else |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
56 |
/* it looks odd to have a switch for two cases, but it leaves room for easy |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
57 |
* expansion. Odds are that Apple will some day use newer CPUs than i686 |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
58 |
*/ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
59 |
case CPU_SUBTYPE_PENTPRO: CPU = "i686"; break; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
60 |
default: CPU = "Unknown Intel"; break; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
61 |
#endif |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
62 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
63 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
64 |
// get the version of OSX |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
65 |
if (Gestalt(gestaltSystemVersion, &sysVersion) != noErr) { |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
66 |
sprintf(OS, "Undetected"); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
67 |
} else { |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
68 |
int majorHiNib = GB(sysVersion, 12, 4); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
69 |
int majorLoNib = GB(sysVersion, 8, 4); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
70 |
int minorNib = GB(sysVersion, 4, 4); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
71 |
int bugNib = GB(sysVersion, 0, 4); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
72 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
73 |
sprintf(OS, "%d%d.%d.%d", majorHiNib, majorLoNib, minorNib, bugNib); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
74 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
75 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
76 |
// make a list of used newgrf files |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
77 |
/* if (_first_grffile != NULL) { |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
78 |
char* n = newgrf; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
79 |
const GRFFile* file; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
80 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
81 |
for (file = _first_grffile; file != NULL; file = file->next) { |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
82 |
n = strecpy(n, " ", lastof(newgrf)); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
83 |
n = strecpy(n, file->filename, lastof(newgrf)); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
84 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
85 |
} else {*/ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
86 |
sprintf(newgrf, "none"); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
87 |
// } |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
88 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
89 |
snprintf( |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
90 |
buffer, lengthof(buffer), |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
91 |
"Please add this info: (tip: copy-paste works)\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
92 |
"CPU: %s, OSX: %s, OpenTTD version: %s\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
93 |
"NewGRF files:%s", |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
94 |
CPU, OS, _openttd_revision, newgrf |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
95 |
); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
96 |
return buffer; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
97 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
98 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
99 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
100 |
#ifdef WITH_SDL |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
101 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
102 |
void ShowMacDialog(const char* title, const char* message, const char* buttonLabel) |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
103 |
{ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
104 |
NSRunAlertPanel([NSString stringWithCString: title], [NSString stringWithCString: message], [NSString stringWithCString: buttonLabel], nil, nil); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
105 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
106 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
107 |
#elif defined WITH_COCOA |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
108 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
109 |
void CocoaDialog(const char* title, const char* message, const char* buttonLabel); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
110 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
111 |
void ShowMacDialog(const char* title, const char* message, const char* buttonLabel) |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
112 |
{ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
113 |
CocoaDialog(title, message, buttonLabel); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
114 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
115 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
116 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
117 |
#else |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
118 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
119 |
void ShowMacDialog(const char* title, const char* message, const char* buttonLabel) |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
120 |
{ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
121 |
fprintf(stderr, "%s: %s\n", title, message); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
122 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
123 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
124 |
#endif |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
125 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
126 |
void ShowMacAssertDialog(const char* function, const char* file, const int line, const char* expression) |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
127 |
{ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
128 |
const char* buffer = |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
129 |
[[NSString stringWithFormat:@ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
130 |
"An assertion has failed and OpenTTD must quit.\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
131 |
"%s in %s (line %d)\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
132 |
"\"%s\"\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
133 |
"\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
134 |
"You should report this error the OpenTTD developers if you think you found a bug.\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
135 |
"\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
136 |
"%s", |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
137 |
function, file, line, expression, GetOSString()] cString |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
138 |
]; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
139 |
NSLog(@"%s", buffer); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
140 |
ToggleFullScreen(0); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
141 |
ShowMacDialog("Assertion Failed", buffer, "Quit"); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
142 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
143 |
// abort so that a debugger has a chance to notice |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
144 |
abort(); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
145 |
} |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
146 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
147 |
|
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
148 |
void ShowMacErrorDialog(const char *error) |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
149 |
{ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
150 |
const char* buffer = |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
151 |
[[NSString stringWithFormat:@ |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
152 |
"Please update to the newest version of OpenTTD\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
153 |
"If the problem presists, please report this to\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
154 |
"http://bugs.openttd.org\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
155 |
"\n" |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
156 |
"%s", |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
157 |
GetOSString()] cString |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
158 |
]; |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
159 |
ToggleFullScreen(0); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
160 |
ShowMacDialog(error, buffer, "Quit"); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
161 |
abort(); |
adaea39e84ab
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
diff
changeset
|
162 |
} |
7435
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
163 |
|
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
164 |
|
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
165 |
/** Determine the current user's locale. */ |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
166 |
const char *GetCurrentLocale(const char *) |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
167 |
{ |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
168 |
static char retbuf[32] = { '\0' }; |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
169 |
NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
170 |
NSArray* languages = [defs objectForKey:@"AppleLanguages"]; |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
171 |
NSString* preferredLang = [languages objectAtIndex:0]; |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
172 |
/* preferredLang is either 2 or 5 characters long ("xx" or "xx_YY"). */ |
7984
f01c62b32738
(svn r11540) -Fix: [OSX] Don't try to compile the quartz video driver on OSX 10.3. It will fail
bjarni
parents:
7965
diff
changeset
|
173 |
|
9757
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
174 |
/* Since Apple introduced encoding to CString in OSX 10.4 we have to make a few conditions |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
175 |
* to get the right code for the used version of OSX. */ |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
176 |
#if (MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_4) |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
177 |
/* 10.4 can compile both versions just fine and will select the correct version at runtime based |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
178 |
* on the version of OSX at execution time. */ |
7965
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
179 |
if (MacOSVersionIsAtLeast(10, 4, 0)) { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
180 |
[ preferredLang getCString:retbuf maxLength:32 encoding:NSASCIIStringEncoding ]; |
9757
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
181 |
} else |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
182 |
#endif |
7984
f01c62b32738
(svn r11540) -Fix: [OSX] Don't try to compile the quartz video driver on OSX 10.3. It will fail
bjarni
parents:
7965
diff
changeset
|
183 |
{ |
9757
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
184 |
[ preferredLang getCString:retbuf maxLength:32 |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
185 |
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
186 |
/* If 10.5+ is used to compile then encoding is needed here. |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
187 |
* If 10.3 or 10.4 is used for compiling then this line is used by 10.3 and encoding should not be present here. */ |
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
188 |
encoding:NSASCIIStringEncoding |
7984
f01c62b32738
(svn r11540) -Fix: [OSX] Don't try to compile the quartz video driver on OSX 10.3. It will fail
bjarni
parents:
7965
diff
changeset
|
189 |
#endif |
9757
136e5c488baa
(svn r13893) -Fix: [OSX] solved a deprecated warning specific to 10.5
bjarni
parents:
9085
diff
changeset
|
190 |
]; |
7965
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
191 |
} |
7435
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
192 |
return retbuf; |
c5d1a7a3235c
(svn r10851) -Feature [OSX]: OpenTTD will now pick the same language as finder is set to if no config file is found (ln-)
bjarni
parents:
6247
diff
changeset
|
193 |
} |
7965
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
194 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
195 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
196 |
/* |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
197 |
* This will only give an accurate result for versions before OS X 10.8 since it uses bcd encoding |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
198 |
* for the minor and bugfix version numbers and a scheme of representing all numbers from 9 and up |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
199 |
* with 9. This means we can't tell OS X 10.9 from 10.9 or 10.11. Please use GetMacOSVersionMajor() |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
200 |
* and GetMacOSVersionMinor() instead. |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
201 |
*/ |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
202 |
static long GetMacOSVersion() |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
203 |
{ |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
204 |
static long sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
205 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
206 |
if (sysVersion != -1) return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
207 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
208 |
if (Gestalt(gestaltSystemVersion, &sysVersion) != noErr) sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
209 |
return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
210 |
} |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
211 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
212 |
long GetMacOSVersionMajor() |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
213 |
{ |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
214 |
static long sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
215 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
216 |
if (sysVersion != -1) return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
217 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
218 |
sysVersion = GetMacOSVersion(); |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
219 |
if (sysVersion == -1) return -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
220 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
221 |
if (sysVersion >= 0x1040) { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
222 |
if (Gestalt(gestaltSystemVersionMajor, &sysVersion) != noErr) sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
223 |
} else { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
224 |
sysVersion = GB(sysVersion, 12, 4) * 10 + GB(sysVersion, 8, 4); |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
225 |
} |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
226 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
227 |
return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
228 |
} |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
229 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
230 |
long GetMacOSVersionMinor() |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
231 |
{ |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
232 |
static long sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
233 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
234 |
if (sysVersion != -1) return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
235 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
236 |
sysVersion = GetMacOSVersion(); |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
237 |
if (sysVersion == -1) return -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
238 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
239 |
if (sysVersion >= 0x1040) { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
240 |
if (Gestalt(gestaltSystemVersionMinor, &sysVersion) != noErr) sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
241 |
} else { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
242 |
sysVersion = GB(sysVersion, 4, 4); |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
243 |
} |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
244 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
245 |
return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
246 |
} |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
247 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
248 |
long GetMacOSVersionBugfix() |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
249 |
{ |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
250 |
static long sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
251 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
252 |
if (sysVersion != -1) return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
253 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
254 |
sysVersion = GetMacOSVersion(); |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
255 |
if (sysVersion == -1) return -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
256 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
257 |
if (sysVersion >= 0x1040) { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
258 |
if (Gestalt(gestaltSystemVersionBugFix, &sysVersion) != noErr) sysVersion = -1; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
259 |
} else { |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
260 |
sysVersion = GB(sysVersion, 0, 4); |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
261 |
} |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
262 |
|
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
263 |
return sysVersion; |
e651c71175d6
(svn r11521) -Codechange: [OSX] Check what the running os version is in a cleaner way.
egladil
parents:
7839
diff
changeset
|
264 |
} |