diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java | 30 | ||||
-rw-r--r-- | platform/iphone/camera_ios.mm | 2 | ||||
-rw-r--r-- | platform/javascript/detect.py | 1 | ||||
-rw-r--r-- | platform/osx/camera_osx.h | 4 | ||||
-rw-r--r-- | platform/osx/camera_osx.mm | 2 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 3 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 54 | ||||
-rw-r--r-- | platform/uwp/detect.py | 1 |
8 files changed, 38 insertions, 59 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java b/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java index 2c4a444e5a..21df5a91b0 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java +++ b/platform/android/java/lib/src/org/godotengine/godot/utils/PermissionsUtil.java @@ -1,3 +1,33 @@ +/*************************************************************************/ +/* PermissionsUtil.java */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + package org.godotengine.godot.utils; import android.Manifest; diff --git a/platform/iphone/camera_ios.mm b/platform/iphone/camera_ios.mm index ff84df66ff..5636ed6262 100644 --- a/platform/iphone/camera_ios.mm +++ b/platform/iphone/camera_ios.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -///@TODO this is a near duplicate of CameraOSX, we should find a way to combine those to minimise code duplication!!!! +///@TODO this is a near duplicate of CameraOSX, we should find a way to combine those to minimize code duplication!!!! // If you fix something here, make sure you fix it there as wel! #include "camera_ios.h" diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index a63fa90067..c05b765c5e 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -24,6 +24,7 @@ def get_opts(): def get_flags(): return [ ('tools', False), + ('builtin_pcre2_with_jit', False), # Disabling the mbedtls module reduces file size. # The module has little use due to the limited networking functionality # in this platform. For the available networking methods, the browser diff --git a/platform/osx/camera_osx.h b/platform/osx/camera_osx.h index 80ca3759ba..7477d8e647 100644 --- a/platform/osx/camera_osx.h +++ b/platform/osx/camera_osx.h @@ -31,7 +31,7 @@ #ifndef CAMERAOSX_H #define CAMERAOSX_H -///@TODO this is a near duplicate of CameraIOS, we should find a way to combine those to minimise code duplication!!!! +///@TODO this is a near duplicate of CameraIOS, we should find a way to combine those to minimize code duplication!!!! // If you fix something here, make sure you fix it there as wel! #include "servers/camera_server.h" @@ -44,4 +44,4 @@ public: void update_feeds(); }; -#endif /* CAMERAOSX_H */
\ No newline at end of file +#endif /* CAMERAOSX_H */ diff --git a/platform/osx/camera_osx.mm b/platform/osx/camera_osx.mm index af09eec2eb..2b0f4906fc 100644 --- a/platform/osx/camera_osx.mm +++ b/platform/osx/camera_osx.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -///@TODO this is a near duplicate of CameraIOS, we should find a way to combine those to minimise code duplication!!!! +///@TODO this is a near duplicate of CameraIOS, we should find a way to combine those to minimize code duplication!!!! // If you fix something here, make sure you fix it there as wel! #include "camera_osx.h" diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 09a871f26c..a61b9234d1 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -113,9 +113,6 @@ public: NSOpenGLContext *context; bool layered_window; - bool waiting_for_vsync; - NSCondition *vsync_condition; - CVDisplayLinkRef displayLink; CursorShape cursor_shape; NSCursor *cursors[CURSOR_MAX]; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index ba3ac9862e..e5166d102b 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -115,21 +115,6 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto return Vector2(mouse_x, mouse_y); } -// DisplayLinkCallback is called from our DisplayLink OS thread informing us right before -// a screen update is required. We can use it to work around the broken vsync. -static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now, const CVTimeStamp *outputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *displayLinkContext) { - OS_OSX *os = (OS_OSX *)displayLinkContext; - - // Set flag so we know we can output our next frame and signal our conditional lock - // if we're not doing vsync this will be ignored - [os->vsync_condition lock]; - os->waiting_for_vsync = false; - [os->vsync_condition signal]; - [os->vsync_condition unlock]; - - return kCVReturnSuccess; -} - @interface GodotApplication : NSApplication @end @@ -1581,15 +1566,6 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a [context makeCurrentContext]; - // setup our display link, this will inform us when a refresh is needed - CVDisplayLinkCreateWithActiveCGDisplays(&displayLink); - CVDisplayLinkSetOutputCallback(displayLink, &DisplayLinkCallback, this); - CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, context.CGLContextObj, pixelFormat.CGLPixelFormatObj); - CVDisplayLinkStart(displayLink); - - // initialise a conditional lock object - vsync_condition = [[NSCondition alloc] init]; - set_use_vsync(p_desired.use_vsync); [NSApp activateIgnoringOtherApps:YES]; @@ -1682,11 +1658,6 @@ void OS_OSX::finalize() { midi_driver.close(); #endif - if (displayLink) { - CVDisplayLinkRelease(displayLink); - } - [vsync_condition release]; - CFNotificationCenterRemoveObserver(CFNotificationCenterGetDistributedCenter(), NULL, kTISNotifySelectedKeyboardInputSourceChanged, NULL); CGDisplayRemoveReconfigurationCallback(displays_arrangement_changed, NULL); @@ -2258,18 +2229,6 @@ String OS_OSX::get_locale() const { } void OS_OSX::swap_buffers() { - if (is_vsync_enabled()) { - // Wait until our DisplayLink callback unsets our flag... - [vsync_condition lock]; - while (waiting_for_vsync) - [vsync_condition wait]; - - // Make sure we wait again next frame around - waiting_for_vsync = true; - - [vsync_condition unlock]; - } - [context flushBuffer]; } @@ -3009,20 +2968,11 @@ Error OS_OSX::move_to_trash(const String &p_path) { } void OS_OSX::_set_use_vsync(bool p_enable) { - // CGLCPSwapInterval broke in OSX 10.14 and it seems Apple is not interested in fixing - // it as OpenGL is now deprecated and Metal solves this differently. - // Following SDLs example we're working around this using DisplayLink - // When vsync is enabled we set a flag "waiting_for_vsync" to true. - // This flag is set to false when DisplayLink informs us our display is about to refresh. - - /* CGLContextObj ctx = CGLGetCurrentContext(); + CGLContextObj ctx = CGLGetCurrentContext(); if (ctx) { GLint swapInterval = p_enable ? 1 : 0; CGLSetParameter(ctx, kCGLCPSwapInterval, &swapInterval); - }*/ - - ///TODO Maybe pause/unpause display link? - waiting_for_vsync = p_enable; + } } OS_OSX *OS_OSX::singleton = NULL; diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index 7da93eafae..000bd18e7d 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -34,6 +34,7 @@ def get_flags(): return [ ('tools', False), ('xaudio2', True), + ('builtin_pcre2_with_jit', False), ] |