Skip to content

Commit

Permalink
Merge pull request #11482 from BastiaanOlij/osx_fix_project_dir
Browse files Browse the repository at this point in the history
Comment out code that is causing project loading to fail on osx

[ci skip]
  • Loading branch information
akien-mga authored Sep 23, 2017
2 parents bac8f63 + 86c6659 commit 18e453b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions platform/osx/os_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,16 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer
}

String OS_OSX::get_resource_dir() const {
/*
Bastiaan Olij - I'm leaving this code commented out but in place so we can have a further discussion about this later on.
For loading the package file from the resource folder it makes more sense to make this call work in ProjectSettings::setup
instead of relying on changing the current working folder as is the case right now (see godot_main_osx.mm).
The problem is that when this function returns a value we try and load a project.godot file from this resources folder and
stop attempting to load anything else if that fails. That breaks our tools build.
One possible solution is to only apply this logic in a non-tools build with an ifdef block.
For now however, just returning this to working condition.
// start with our executable path
String path = get_executable_path();
Expand All @@ -1742,6 +1752,8 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer
return OS::get_resource_dir();
return path.substr(0, pos) + "/Contents/Resources/";
*/
return OS::get_resource_dir();
}

// Returns string representation of keys, if they are printable.
Expand Down

0 comments on commit 18e453b

Please sign in to comment.