summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r--platform/osx/os_osx.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index f502fb9a9c..ffc497b780 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1736,6 +1736,17 @@ String OS_OSX::get_executable_path() const {
}
}
+String OS_OSX::get_resource_dir() const {
+ // start with our executable path
+ String path = get_executable_path();
+
+ int pos = path.find_last("/Contents/MacOS/");
+ if (pos < 0)
+ return OS::get_resource_dir();
+
+ return path.substr(0, pos) + "/Contents/Resources/";
+}
+
// Returns string representation of keys, if they are printable.
//
static NSString *createStringForKeys(const CGKeyCode *keyCode, int length) {