Fix OSXCROSS build with clang-6.0
Backport from Fabio Alessandrelli's commit at
875d822d77
This commit is contained in:
parent
0eab0d9343
commit
49929c1e57
|
@ -1566,7 +1566,8 @@ String OS_OSX::get_godot_dir_name() const {
|
||||||
|
|
||||||
String OS_OSX::get_system_dir(SystemDir p_dir) const {
|
String OS_OSX::get_system_dir(SystemDir p_dir) const {
|
||||||
|
|
||||||
NSSearchPathDirectory id = 0;
|
NSSearchPathDirectory id;
|
||||||
|
bool found = true;
|
||||||
|
|
||||||
switch (p_dir) {
|
switch (p_dir) {
|
||||||
case SYSTEM_DIR_DESKTOP: {
|
case SYSTEM_DIR_DESKTOP: {
|
||||||
|
@ -1587,10 +1588,13 @@ String OS_OSX::get_system_dir(SystemDir p_dir) const {
|
||||||
case SYSTEM_DIR_PICTURES: {
|
case SYSTEM_DIR_PICTURES: {
|
||||||
id = NSPicturesDirectory;
|
id = NSPicturesDirectory;
|
||||||
} break;
|
} break;
|
||||||
|
default: {
|
||||||
|
found = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String ret;
|
String ret;
|
||||||
if (id) {
|
if (found) {
|
||||||
|
|
||||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(id, NSUserDomainMask, YES);
|
NSArray *paths = NSSearchPathForDirectoriesInDomains(id, NSUserDomainMask, YES);
|
||||||
if (paths && [paths count] >= 1) {
|
if (paths && [paths count] >= 1) {
|
||||||
|
@ -2056,7 +2060,7 @@ static NSString *createStringForKeys(const CGKeyCode *keyCode, int length) {
|
||||||
|
|
||||||
CFDataRef layoutData = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
|
CFDataRef layoutData = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
|
||||||
if (!layoutData)
|
if (!layoutData)
|
||||||
return nil;
|
return 0;
|
||||||
|
|
||||||
const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout *)CFDataGetBytePtr(layoutData);
|
const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout *)CFDataGetBytePtr(layoutData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue