summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/SCsub7
-rw-r--r--platform/osx/detect.py13
-rw-r--r--platform/osx/os_osx.h4
-rw-r--r--platform/osx/os_osx.mm8
4 files changed, 29 insertions, 3 deletions
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index cb88bc470a..029e3d808c 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -4,7 +4,12 @@ import os
Import('env')
def make_debug(target, source, env):
- os.system('dsymutil %s -o %s.dSYM' % (target[0], target[0]))
+ if (env["macports_clang"] != 'no'):
+ mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
+ mpclangver = env["macports_clang"]
+ os.system(mpprefix + '/libexec/llvm-' + mpclangver + '/bin/llvm-dsymutil %s -o %s.dSYM' % (target[0], target[0]))
+ else:
+ os.system('dsymutil %s -o %s.dSYM' % (target[0], target[0]))
files = [
'crash_handler_osx.mm',
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index ff7cf2ad2f..e8a8319431 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -72,6 +72,19 @@ def configure(env):
else: # 64-bit, default
env.Append(CCFLAGS=['-arch', 'x86_64'])
env.Append(LINKFLAGS=['-arch', 'x86_64'])
+ if (env["macports_clang"] != 'no'):
+ mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
+ mpclangver = env["macports_clang"]
+ env["CC"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang"
+ env["LD"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang++"
+ env["CXX"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/clang++"
+ env['AR'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ar"
+ env['RANLIB'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ranlib"
+ env['AS'] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-as"
+ env.Append(CCFLAGS=['-D__MACPORTS__']) #hack to fix libvpx MM256_BROADCASTSI128_SI256 define
+ if (env["openmp"]):
+ env.Append(CPPFLAGS=['-fopenmp'])
+ env.Append(LINKFLAGS=['-fopenmp'])
else: # osxcross build
root = os.environ.get("OSXCROSS_ROOT", 0)
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 6543ca7dd2..ede50a05ba 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -204,7 +204,7 @@ public:
virtual void request_attention();
virtual String get_joy_guid(int p_device) const;
- virtual void set_borderless_window(int p_borderless);
+ virtual void set_borderless_window(bool p_borderless);
virtual bool get_borderless_window();
virtual void set_ime_position(const Point2 &p_pos);
virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp);
@@ -228,6 +228,8 @@ public:
virtual Error move_to_trash(const String &p_path);
+ void force_process_input();
+
OS_OSX();
private:
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 75d0bd1648..f3809e6eed 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1818,7 +1818,7 @@ void OS_OSX::request_attention() {
[NSApp requestUserAttention:NSCriticalRequest];
}
-void OS_OSX::set_borderless_window(int p_borderless) {
+void OS_OSX::set_borderless_window(bool p_borderless) {
// OrderOut prevents a lose focus bug with the window
[window_object orderOut:nil];
@@ -1971,6 +1971,12 @@ void OS_OSX::push_input(const Ref<InputEvent> &p_event) {
input->parse_input_event(ev);
}
+void OS_OSX::force_process_input() {
+
+ process_events(); // get rid of pending events
+ joypad_osx->process_joypads();
+}
+
void OS_OSX::run() {
force_quit = false;