diff options
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r-- | platform/osx/os_osx.mm | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index f502fb9a9c..5a23d76755 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -910,6 +910,8 @@ OS::VideoMode OS_OSX::get_default_video_mode() const { void OS_OSX::initialize_core() { + crash_handler.initialize(); + OS_Unix::initialize_core(); DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_RESOURCES); @@ -1736,6 +1738,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) { @@ -1901,7 +1914,7 @@ String OS_OSX::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } -PowerState OS_OSX::get_power_state() { +OS::PowerState OS_OSX::get_power_state() { return power_manager->get_power_state(); } @@ -2011,3 +2024,11 @@ OS_OSX::OS_OSX() { bool OS_OSX::_check_internal_feature_support(const String &p_feature) { return p_feature == "pc" || p_feature == "s3tc"; } + +void OS_OSX::disable_crash_handler() { + crash_handler.disable(); +} + +bool OS_OSX::is_disable_crash_handler() const { + return crash_handler.is_disabled(); +} |