forked from mia/Aegisub
Fix check for OS X version in the update checker
Originally committed to SVN as r6955.
This commit is contained in:
parent
21841e84a8
commit
d132364025
1 changed files with 4 additions and 2 deletions
|
@ -240,7 +240,9 @@ static const char * GetOSShortName()
|
||||||
else
|
else
|
||||||
return "windows"; // future proofing? I doubt we run on nt4
|
return "windows"; // future proofing? I doubt we run on nt4
|
||||||
}
|
}
|
||||||
else if (osid & wxOS_MAC_OSX_DARWIN && osver_maj == 0x10) // yes 0x10, not decimal 10, don't ask me
|
// CF returns 0x10 for some reason, which wx has recently started
|
||||||
|
// turning into 10
|
||||||
|
else if (osid & wxOS_MAC_OSX_DARWIN && (osver_maj == 0x10 || osver_maj == 10))
|
||||||
{
|
{
|
||||||
// ugliest hack in the world? nah.
|
// ugliest hack in the world? nah.
|
||||||
static char osxstring[] = "osx00";
|
static char osxstring[] = "osx00";
|
||||||
|
@ -315,7 +317,7 @@ static wxString GetSystemLanguage()
|
||||||
CFLocaleRef locale = CFLocaleCopyCurrent();
|
CFLocaleRef locale = CFLocaleCopyCurrent();
|
||||||
CFStringRef localeName = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleIdentifier);
|
CFStringRef localeName = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleIdentifier);
|
||||||
|
|
||||||
char buf[128];
|
char buf[128] = { 0 };
|
||||||
CFStringGetCString(localeName, buf, sizeof buf, kCFStringEncodingUTF8);
|
CFStringGetCString(localeName, buf, sizeof buf, kCFStringEncodingUTF8);
|
||||||
CFRelease(locale);
|
CFRelease(locale);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue