diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/SCsub | 4 | ||||
-rw-r--r-- | platform/android/api/api.h | 5 | ||||
-rw-r--r-- | platform/android/export/export.h | 5 | ||||
-rw-r--r-- | platform/iphone/export/export.h | 5 | ||||
-rw-r--r-- | platform/iphone/platform_refcount.h | 48 | ||||
-rw-r--r-- | platform/javascript/api/api.h | 5 | ||||
-rw-r--r-- | platform/osx/export/export.h | 5 | ||||
-rw-r--r-- | platform/uwp/export/export.h | 5 | ||||
-rw-r--r-- | platform/x11/detect_prime.cpp | 2 | ||||
-rw-r--r-- | platform/x11/export/export.h | 5 | ||||
-rw-r--r-- | platform/x11/joypad_linux.cpp | 5 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 6 |
12 files changed, 45 insertions, 55 deletions
diff --git a/platform/SCsub b/platform/SCsub index 38bab59d74..40cacce674 100644 --- a/platform/SCsub +++ b/platform/SCsub @@ -1,7 +1,5 @@ #!/usr/bin/env python -from compat import open_utf8 - Import('env') env.platform_sources = [] @@ -21,7 +19,7 @@ reg_apis += '}\n\n' unreg_apis += '}\n' # NOTE: It is safe to generate this file here, since this is still execute serially -with open_utf8('register_platform_apis.gen.cpp', 'w') as f: +with open('register_platform_apis.gen.cpp', 'w', encoding="utf-8") as f: f.write(reg_apis_inc) f.write(reg_apis) f.write(unreg_apis) diff --git a/platform/android/api/api.h b/platform/android/api/api.h index c7296d92a7..5e951b9c88 100644 --- a/platform/android/api/api.h +++ b/platform/android/api/api.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef ANDROID_API_H +#define ANDROID_API_H + void register_android_api(); void unregister_android_api(); + +#endif // ANDROID_API_H diff --git a/platform/android/export/export.h b/platform/android/export/export.h index ce786cc8b6..d11ab9f49e 100644 --- a/platform/android/export/export.h +++ b/platform/android/export/export.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef ANDROID_EXPORT_H +#define ANDROID_EXPORT_H + void register_android_exporter(); + +#endif // ANDROID_EXPORT_H diff --git a/platform/iphone/export/export.h b/platform/iphone/export/export.h index 77b2a07bd1..043d21f533 100644 --- a/platform/iphone/export/export.h +++ b/platform/iphone/export/export.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef IPHONE_EXPORT_H +#define IPHONE_EXPORT_H + void register_iphone_exporter(); + +#endif // IPHONE_EXPORT_H diff --git a/platform/iphone/platform_refcount.h b/platform/iphone/platform_refcount.h deleted file mode 100644 index 9029418462..0000000000 --- a/platform/iphone/platform_refcount.h +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************/ -/* platform_refcount.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 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. */ -/*************************************************************************/ - -#include "core/safe_refcount.h" - -#ifdef IPHONE_ENABLED - -#define REFCOUNT_T int -#define REFCOUNT_GET_T int const volatile & - -#include <libkern/OSAtomic.h> - -inline int atomic_conditional_increment(volatile int *v) { - return (*v == 0) ? 0 : OSAtomicIncrement32(v); -} - -inline int atomic_decrement(volatile int *v) { - return OSAtomicDecrement32(v); -} - -#endif diff --git a/platform/javascript/api/api.h b/platform/javascript/api/api.h index 164d679205..8afe0f33ce 100644 --- a/platform/javascript/api/api.h +++ b/platform/javascript/api/api.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef JAVASCRIPT_API_H +#define JAVASCRIPT_API_H + void register_javascript_api(); void unregister_javascript_api(); + +#endif // JAVASCRIPT_API_H diff --git a/platform/osx/export/export.h b/platform/osx/export/export.h index 7b8832cb01..4ddcec09fb 100644 --- a/platform/osx/export/export.h +++ b/platform/osx/export/export.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef OSX_EXPORT_H +#define OSX_EXPORT_H + void register_osx_exporter(); + +#endif // OSX_EXPORT_H diff --git a/platform/uwp/export/export.h b/platform/uwp/export/export.h index ce03bc0aeb..1a1555d8ee 100644 --- a/platform/uwp/export/export.h +++ b/platform/uwp/export/export.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef UWP_EXPORT_H +#define UWP_EXPORT_H + void register_uwp_exporter(); + +#endif // UWP_EXPORT_H diff --git a/platform/x11/detect_prime.cpp b/platform/x11/detect_prime.cpp index a0e5f835c0..d79fd00118 100644 --- a/platform/x11/detect_prime.cpp +++ b/platform/x11/detect_prime.cpp @@ -31,6 +31,8 @@ #ifdef X11_ENABLED #if defined(OPENGL_ENABLED) +#include "detect_prime.h" + #include "core/print_string.h" #include "core/ustring.h" diff --git a/platform/x11/export/export.h b/platform/x11/export/export.h index d94ea114a8..4049e6a8bf 100644 --- a/platform/x11/export/export.h +++ b/platform/x11/export/export.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef X11_EXPORT_H +#define X11_EXPORT_H + void register_x11_exporter(); + +#endif // X11_EXPORT_H diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp index a9fe7275c2..1aacc6a250 100644 --- a/platform/x11/joypad_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -340,7 +340,10 @@ void JoypadLinux::open_joypad(const char *p_path) { (test_bit(ABS_X, absbit) || test_bit(ABS_Y, absbit) || test_bit(ABS_HAT0X, absbit) || test_bit(ABS_GAS, absbit) || test_bit(ABS_RUDDER, absbit)) && (test_bit(BTN_A, keybit) || test_bit(BTN_THUMBL, keybit) || - test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_1, keybit)))) { + test_bit(BTN_TRIGGER, keybit) || test_bit(BTN_1, keybit))) && + !(test_bit(EV_ABS, evbit) && + test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit) && + test_bit(ABS_RX, absbit) && test_bit(ABS_RY, absbit))) { close(fd); return; } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index e1f7691cf6..772913980b 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -267,6 +267,9 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a unsigned long valuemask = CWBorderPixel | CWColormap | CWEventMask; x11_window = XCreateWindow(x11_display, RootWindow(x11_display, visualInfo->screen), 0, 0, OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height, 0, visualInfo->depth, InputOutput, visualInfo->visual, valuemask, &windowAttributes); + wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true); + XSetWMProtocols(x11_display, x11_window, &wm_delete, 1); + //set_class_hint(x11_display, x11_window); XMapWindow(x11_display, x11_window); XFlush(x11_display); @@ -476,9 +479,6 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a /* set the titlebar name */ XStoreName(x11_display, x11_window, "Godot"); - wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true); - XSetWMProtocols(x11_display, x11_window, &wm_delete, 1); - im_active = false; im_position = Vector2(); |