瀏覽代碼

Style: Harmonize header includes in platform ports

This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.

The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
Rémi Verschelde 2 年之前
父節點
當前提交
9e4315bb50
共有 100 個文件被更改,包括 324 次插入266 次删除
  1. 2 2
      drivers/coreaudio/audio_driver_coreaudio.cpp
  2. 2 2
      drivers/coremidi/midi_driver_coremidi.cpp
  3. 1 1
      platform/android/SCsub
  4. 2 1
      platform/android/android_keys_utils.h
  5. 2 1
      platform/android/api/api.cpp
  6. 2 1
      platform/android/api/jni_singleton.h
  7. 2 1
      platform/android/dir_access_jandroid.cpp
  8. 3 1
      platform/android/dir_access_jandroid.h
  9. 6 2
      platform/android/display_server_android.cpp
  10. 2 1
      platform/android/export/export.cpp
  11. 2 2
      platform/android/export/export_plugin.cpp
  12. 1 0
      platform/android/export/godot_plugin_config.cpp
  13. 1 0
      platform/android/file_access_android.h
  14. 2 1
      platform/android/file_access_filesystem_jandroid.cpp
  15. 2 1
      platform/android/file_access_filesystem_jandroid.h
  16. 4 3
      platform/android/java_godot_io_wrapper.h
  17. 11 12
      platform/android/java_godot_lib_jni.cpp
  18. 3 2
      platform/android/java_godot_view_wrapper.h
  19. 5 4
      platform/android/java_godot_wrapper.h
  20. 4 2
      platform/android/jni_utils.h
  21. 8 9
      platform/android/os_android.cpp
  22. 1 0
      platform/android/os_android.h
  23. 7 6
      platform/android/plugin/godot_plugin_jni.cpp
  24. 3 1
      platform/android/string_android.h
  25. 2 2
      platform/android/thread_jandroid.cpp
  26. 2 2
      platform/android/vulkan_context_android.cpp
  27. 0 0
      platform/android/vulkan_context_android.h
  28. 1 1
      platform/ios/api/api.cpp
  29. 5 4
      platform/ios/app_delegate.mm
  30. 3 2
      platform/ios/display_layer.mm
  31. 3 3
      platform/ios/display_server_ios.h
  32. 7 6
      platform/ios/display_server_ios.mm
  33. 2 1
      platform/ios/export/export.cpp
  34. 2 1
      platform/ios/export/export_plugin.cpp
  35. 3 3
      platform/ios/export/export_plugin.h
  36. 2 1
      platform/ios/godot_ios.mm
  37. 4 3
      platform/ios/godot_view.mm
  38. 3 2
      platform/ios/godot_view_renderer.mm
  39. 1 0
      platform/ios/ios.h
  40. 1 1
      platform/ios/ios.mm
  41. 4 5
      platform/ios/joypad_ios.mm
  42. 1 1
      platform/ios/key_mapping_ios.mm
  43. 3 2
      platform/ios/keyboard_input_view.mm
  44. 6 4
      platform/ios/os_ios.h
  45. 7 5
      platform/ios/os_ios.mm
  46. 6 6
      platform/ios/tts_ios.h
  47. 1 1
      platform/ios/tts_ios.mm
  48. 5 3
      platform/ios/view_controller.mm
  49. 2 1
      platform/ios/vulkan_context_ios.mm
  50. 2 1
      platform/linuxbsd/export/export.cpp
  51. 3 2
      platform/linuxbsd/export/export_plugin.cpp
  52. 1 2
      platform/linuxbsd/freedesktop_portal_desktop.cpp
  53. 4 3
      platform/linuxbsd/godot_linuxbsd.cpp
  54. 1 0
      platform/linuxbsd/joypad_linux.h
  55. 7 7
      platform/linuxbsd/os_linuxbsd.cpp
  56. 3 2
      platform/linuxbsd/os_linuxbsd.h
  57. 5 9
      platform/linuxbsd/x11/detect_prime_x11.cpp
  58. 6 5
      platform/linuxbsd/x11/display_server_x11.cpp
  59. 17 16
      platform/linuxbsd/x11/display_server_x11.h
  60. 4 6
      platform/linuxbsd/x11/gl_manager_x11.cpp
  61. 3 7
      platform/linuxbsd/x11/gl_manager_x11.h
  62. 4 3
      platform/linuxbsd/x11/key_mapping_x11.h
  63. 1 0
      platform/linuxbsd/x11/vulkan_context_x11.h
  64. 4 3
      platform/macos/display_server_macos.h
  65. 7 8
      platform/macos/display_server_macos.mm
  66. 2 2
      platform/macos/export/codesign.h
  67. 2 2
      platform/macos/export/export_plugin.cpp
  68. 2 2
      platform/macos/export/lipo.h
  69. 3 3
      platform/macos/gl_manager_macos_legacy.h
  70. 5 7
      platform/macos/gl_manager_macos_legacy.mm
  71. 1 0
      platform/macos/godot_content_view.mm
  72. 2 2
      platform/macos/godot_main_macos.mm
  73. 2 2
      platform/macos/joypad_macos.h
  74. 3 3
      platform/macos/key_mapping_macos.mm
  75. 5 4
      platform/macos/os_macos.h
  76. 4 4
      platform/macos/os_macos.mm
  77. 1 0
      platform/macos/vulkan_context_macos.h
  78. 3 1
      platform/macos/vulkan_context_macos.mm
  79. 0 5
      platform/uwp/app_uwp.cpp
  80. 3 4
      platform/uwp/app_uwp.h
  81. 1 1
      platform/uwp/context_egl_uwp.cpp
  82. 3 4
      platform/uwp/context_egl_uwp.h
  83. 2 1
      platform/uwp/export/export.cpp
  84. 2 1
      platform/uwp/export/export_plugin.cpp
  85. 2 2
      platform/uwp/export/export_plugin.h
  86. 2 1
      platform/uwp/os_uwp.h
  87. 11 1
      platform/web/api/api.cpp
  88. 4 2
      platform/web/api/web_tools_editor_plugin.cpp
  89. 5 1
      platform/web/api/web_tools_editor_plugin.h
  90. 2 2
      platform/web/audio_driver_web.h
  91. 6 5
      platform/web/display_server_web.cpp
  92. 2 1
      platform/web/export/export.cpp
  93. 3 2
      platform/web/export/export_plugin.cpp
  94. 2 1
      platform/web/export/export_plugin.h
  95. 2 1
      platform/web/godot_audio.h
  96. 1 1
      platform/web/godot_js.h
  97. 2 2
      platform/web/godot_webgl2.h
  98. 1 1
      platform/web/http_client_web.h
  99. 3 1
      platform/web/javascript_bridge_singleton.cpp
  100. 4 4
      platform/web/os_web.cpp

+ 2 - 2
drivers/coreaudio/audio_driver_coreaudio.cpp

@@ -28,10 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef COREAUDIO_ENABLED
-
 #include "audio_driver_coreaudio.h"
 #include "audio_driver_coreaudio.h"
 
 
+#ifdef COREAUDIO_ENABLED
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 
 

+ 2 - 2
drivers/coremidi/midi_driver_coremidi.cpp

@@ -28,10 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef COREMIDI_ENABLED
-
 #include "midi_driver_coremidi.h"
 #include "midi_driver_coremidi.h"
 
 
+#ifdef COREMIDI_ENABLED
+
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 
 
 #import <CoreAudio/HostTime.h>
 #import <CoreAudio/HostTime.h>

+ 1 - 1
platform/android/SCsub

@@ -21,7 +21,7 @@ android_files = [
     "android_keys_utils.cpp",
     "android_keys_utils.cpp",
     "display_server_android.cpp",
     "display_server_android.cpp",
     "plugin/godot_plugin_jni.cpp",
     "plugin/godot_plugin_jni.cpp",
-    "vulkan/vulkan_context_android.cpp",
+    "vulkan_context_android.cpp",
 ]
 ]
 
 
 env_android = env.Clone()
 env_android = env.Clone()

+ 2 - 1
platform/android/android_keys_utils.h

@@ -31,8 +31,9 @@
 #ifndef ANDROID_KEYS_UTILS_H
 #ifndef ANDROID_KEYS_UTILS_H
 #define ANDROID_KEYS_UTILS_H
 #define ANDROID_KEYS_UTILS_H
 
 
+#include "core/os/keyboard.h"
+
 #include <android/input.h>
 #include <android/input.h>
-#include <core/os/keyboard.h>
 
 
 #define AKEYCODE_MAX 0xFFFF
 #define AKEYCODE_MAX 0xFFFF
 
 

+ 2 - 1
platform/android/api/api.cpp

@@ -30,10 +30,11 @@
 
 
 #include "api.h"
 #include "api.h"
 
 
-#include "core/config/engine.h"
 #include "java_class_wrapper.h"
 #include "java_class_wrapper.h"
 #include "jni_singleton.h"
 #include "jni_singleton.h"
 
 
+#include "core/config/engine.h"
+
 #if !defined(ANDROID_ENABLED)
 #if !defined(ANDROID_ENABLED)
 static JavaClassWrapper *java_class_wrapper = nullptr;
 static JavaClassWrapper *java_class_wrapper = nullptr;
 #endif
 #endif

+ 2 - 1
platform/android/api/jni_singleton.h

@@ -33,8 +33,9 @@
 
 
 #include "core/config/engine.h"
 #include "core/config/engine.h"
 #include "core/variant/variant.h"
 #include "core/variant/variant.h"
+
 #ifdef ANDROID_ENABLED
 #ifdef ANDROID_ENABLED
-#include "platform/android/jni_utils.h"
+#include "jni_utils.h"
 #endif
 #endif
 
 
 class JNISingleton : public Object {
 class JNISingleton : public Object {

+ 2 - 1
platform/android/dir_access_jandroid.cpp

@@ -30,10 +30,11 @@
 
 
 #include "dir_access_jandroid.h"
 #include "dir_access_jandroid.h"
 
 
-#include "core/string/print_string.h"
 #include "string_android.h"
 #include "string_android.h"
 #include "thread_jandroid.h"
 #include "thread_jandroid.h"
 
 
+#include "core/string/print_string.h"
+
 jobject DirAccessJAndroid::dir_access_handler = nullptr;
 jobject DirAccessJAndroid::dir_access_handler = nullptr;
 jclass DirAccessJAndroid::cls = nullptr;
 jclass DirAccessJAndroid::cls = nullptr;
 jmethodID DirAccessJAndroid::_dir_open = nullptr;
 jmethodID DirAccessJAndroid::_dir_open = nullptr;

+ 3 - 1
platform/android/dir_access_jandroid.h

@@ -31,9 +31,11 @@
 #ifndef DIR_ACCESS_JANDROID_H
 #ifndef DIR_ACCESS_JANDROID_H
 #define DIR_ACCESS_JANDROID_H
 #define DIR_ACCESS_JANDROID_H
 
 
+#include "java_godot_lib_jni.h"
+
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/dir_access_unix.h"
-#include "java_godot_lib_jni.h"
+
 #include <stdio.h>
 #include <stdio.h>
 
 
 /// Android implementation of the DirAccess interface used to provide access to
 /// Android implementation of the DirAccess interface used to provide access to

+ 6 - 2
platform/android/display_server_android.cpp

@@ -30,19 +30,23 @@
 
 
 #include "display_server_android.h"
 #include "display_server_android.h"
 
 
-#include "core/config/project_settings.h"
 #include "java_godot_io_wrapper.h"
 #include "java_godot_io_wrapper.h"
 #include "java_godot_wrapper.h"
 #include "java_godot_wrapper.h"
 #include "os_android.h"
 #include "os_android.h"
 #include "tts_android.h"
 #include "tts_android.h"
 
 
+#include "core/config/project_settings.h"
+
 #if defined(VULKAN_ENABLED)
 #if defined(VULKAN_ENABLED)
+#include "vulkan_context_android.h"
+
 #include "drivers/vulkan/rendering_device_vulkan.h"
 #include "drivers/vulkan/rendering_device_vulkan.h"
-#include "platform/android/vulkan/vulkan_context_android.h"
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 #endif
 #endif
+
 #ifdef GLES3_ENABLED
 #ifdef GLES3_ENABLED
 #include "drivers/gles3/rasterizer_gles3.h"
 #include "drivers/gles3/rasterizer_gles3.h"
+
 #include <EGL/egl.h>
 #include <EGL/egl.h>
 #endif
 #endif
 
 

+ 2 - 1
platform/android/export/export.cpp

@@ -30,10 +30,11 @@
 
 
 #include "export.h"
 #include "export.h"
 
 
+#include "export_plugin.h"
+
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "export_plugin.h"
 
 
 void register_android_exporter_types() {
 void register_android_exporter_types() {
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformAndroid);
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformAndroid);

+ 2 - 2
platform/android/export/export_plugin.cpp

@@ -30,6 +30,8 @@
 
 
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "../logo_svg.gen.h"
+#include "../run_icon_svg.gen.h"
 #include "gradle_export_util.h"
 #include "gradle_export_util.h"
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
@@ -46,8 +48,6 @@
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "main/splash.gen.h"
 #include "main/splash.gen.h"
-#include "platform/android/logo_svg.gen.h"
-#include "platform/android/run_icon_svg.gen.h"
 
 
 #include "modules/modules_enabled.gen.h" // For svg.
 #include "modules/modules_enabled.gen.h" // For svg.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED

+ 1 - 0
platform/android/export/godot_plugin_config.cpp

@@ -29,6 +29,7 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "godot_plugin_config.h"
 #include "godot_plugin_config.h"
+
 /*
 /*
  * Set of prebuilt plugins.
  * Set of prebuilt plugins.
  * Currently unused, this is just for future reference:
  * Currently unused, this is just for future reference:

+ 1 - 0
platform/android/file_access_android.h

@@ -32,6 +32,7 @@
 #define FILE_ACCESS_ANDROID_H
 #define FILE_ACCESS_ANDROID_H
 
 
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
+
 #include <android/asset_manager.h>
 #include <android/asset_manager.h>
 #include <android/log.h>
 #include <android/log.h>
 #include <stdio.h>
 #include <stdio.h>

+ 2 - 1
platform/android/file_access_filesystem_jandroid.cpp

@@ -30,9 +30,10 @@
 
 
 #include "file_access_filesystem_jandroid.h"
 #include "file_access_filesystem_jandroid.h"
 
 
+#include "thread_jandroid.h"
+
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
-#include "thread_jandroid.h"
 
 
 #include <unistd.h>
 #include <unistd.h>
 
 

+ 2 - 1
platform/android/file_access_filesystem_jandroid.h

@@ -31,9 +31,10 @@
 #ifndef FILE_ACCESS_FILESYSTEM_JANDROID_H
 #ifndef FILE_ACCESS_FILESYSTEM_JANDROID_H
 #define FILE_ACCESS_FILESYSTEM_JANDROID_H
 #define FILE_ACCESS_FILESYSTEM_JANDROID_H
 
 
-#include "core/io/file_access.h"
 #include "java_godot_lib_jni.h"
 #include "java_godot_lib_jni.h"
 
 
+#include "core/io/file_access.h"
+
 class FileAccessFilesystemJAndroid : public FileAccess {
 class FileAccessFilesystemJAndroid : public FileAccess {
 	static jobject file_access_handler;
 	static jobject file_access_handler;
 	static jclass cls;
 	static jclass cls;

+ 4 - 3
platform/android/java_godot_io_wrapper.h

@@ -31,12 +31,13 @@
 #ifndef JAVA_GODOT_IO_WRAPPER_H
 #ifndef JAVA_GODOT_IO_WRAPPER_H
 #define JAVA_GODOT_IO_WRAPPER_H
 #define JAVA_GODOT_IO_WRAPPER_H
 
 
-#include <android/log.h>
-#include <jni.h>
+#include "string_android.h"
 
 
 #include "core/math/rect2i.h"
 #include "core/math/rect2i.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
-#include "string_android.h"
+
+#include <android/log.h>
+#include <jni.h>
 
 
 // Class that makes functions in java/src/org/godotengine/godot/GodotIO.java callable from C++
 // Class that makes functions in java/src/org/godotengine/godot/GodotIO.java callable from C++
 class GodotIOJavaWrapper {
 class GodotIOJavaWrapper {

+ 11 - 12
platform/android/java_godot_lib_jni.cpp

@@ -30,37 +30,36 @@
 
 
 #include "java_godot_lib_jni.h"
 #include "java_godot_lib_jni.h"
 
 
-#include "java_godot_io_wrapper.h"
-#include "java_godot_wrapper.h"
-
-#include "android/asset_manager_jni.h"
 #include "android_input_handler.h"
 #include "android_input_handler.h"
 #include "api/java_class_wrapper.h"
 #include "api/java_class_wrapper.h"
 #include "api/jni_singleton.h"
 #include "api/jni_singleton.h"
-#include "core/config/engine.h"
-#include "core/config/project_settings.h"
-#include "core/input/input.h"
 #include "dir_access_jandroid.h"
 #include "dir_access_jandroid.h"
 #include "display_server_android.h"
 #include "display_server_android.h"
 #include "file_access_android.h"
 #include "file_access_android.h"
 #include "file_access_filesystem_jandroid.h"
 #include "file_access_filesystem_jandroid.h"
+#include "java_godot_io_wrapper.h"
+#include "java_godot_wrapper.h"
 #include "jni_utils.h"
 #include "jni_utils.h"
-#include "main/main.h"
 #include "net_socket_android.h"
 #include "net_socket_android.h"
 #include "os_android.h"
 #include "os_android.h"
 #include "string_android.h"
 #include "string_android.h"
 #include "thread_jandroid.h"
 #include "thread_jandroid.h"
 #include "tts_android.h"
 #include "tts_android.h"
 
 
-#include <android/input.h>
-#include <unistd.h>
-
-#include <android/native_window_jni.h>
+#include "core/config/engine.h"
+#include "core/config/project_settings.h"
+#include "core/input/input.h"
+#include "main/main.h"
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #endif
 #endif
 
 
+#include <android/asset_manager_jni.h>
+#include <android/input.h>
+#include <android/native_window_jni.h>
+#include <unistd.h>
+
 static JavaClassWrapper *java_class_wrapper = nullptr;
 static JavaClassWrapper *java_class_wrapper = nullptr;
 static OS_Android *os_android = nullptr;
 static OS_Android *os_android = nullptr;
 static AndroidInputHandler *input_handler = nullptr;
 static AndroidInputHandler *input_handler = nullptr;

+ 3 - 2
platform/android/java_godot_view_wrapper.h

@@ -31,12 +31,13 @@
 #ifndef JAVA_GODOT_VIEW_WRAPPER_H
 #ifndef JAVA_GODOT_VIEW_WRAPPER_H
 #define JAVA_GODOT_VIEW_WRAPPER_H
 #define JAVA_GODOT_VIEW_WRAPPER_H
 
 
+#include "string_android.h"
+
 #include "core/math/vector2.h"
 #include "core/math/vector2.h"
+
 #include <android/log.h>
 #include <android/log.h>
 #include <jni.h>
 #include <jni.h>
 
 
-#include "string_android.h"
-
 // Class that makes functions in java/src/org/godotengine/godot/GodotView.java callable from C++
 // Class that makes functions in java/src/org/godotengine/godot/GodotView.java callable from C++
 class GodotJavaViewWrapper {
 class GodotJavaViewWrapper {
 private:
 private:

+ 5 - 4
platform/android/java_godot_wrapper.h

@@ -31,13 +31,14 @@
 #ifndef JAVA_GODOT_WRAPPER_H
 #ifndef JAVA_GODOT_WRAPPER_H
 #define JAVA_GODOT_WRAPPER_H
 #define JAVA_GODOT_WRAPPER_H
 
 
-#include <android/log.h>
-#include <jni.h>
-
-#include "core/templates/list.h"
 #include "java_godot_view_wrapper.h"
 #include "java_godot_view_wrapper.h"
 #include "string_android.h"
 #include "string_android.h"
 
 
+#include "core/templates/list.h"
+
+#include <android/log.h>
+#include <jni.h>
+
 // Class that makes functions in java/src/org/godotengine/godot/Godot.java callable from C++
 // Class that makes functions in java/src/org/godotengine/godot/Godot.java callable from C++
 class GodotJavaWrapper {
 class GodotJavaWrapper {
 private:
 private:

+ 4 - 2
platform/android/jni_utils.h

@@ -32,8 +32,10 @@
 #define JNI_UTILS_H
 #define JNI_UTILS_H
 
 
 #include "string_android.h"
 #include "string_android.h"
-#include <core/config/engine.h>
-#include <core/variant/variant.h>
+
+#include "core/config/engine.h"
+#include "core/variant/variant.h"
+
 #include <jni.h>
 #include <jni.h>
 
 
 struct jvalret {
 struct jvalret {

+ 8 - 9
platform/android/os_android.cpp

@@ -30,25 +30,24 @@
 
 
 #include "os_android.h"
 #include "os_android.h"
 
 
+#include "dir_access_jandroid.h"
+#include "display_server_android.h"
+#include "file_access_android.h"
+#include "file_access_filesystem_jandroid.h"
+#include "java_godot_io_wrapper.h"
+#include "java_godot_wrapper.h"
+#include "net_socket_android.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/file_access_unix.h"
 #include "drivers/unix/file_access_unix.h"
 #include "main/main.h"
 #include "main/main.h"
-#include "platform/android/display_server_android.h"
 #include "scene/main/scene_tree.h"
 #include "scene/main/scene_tree.h"
 #include "servers/rendering_server.h"
 #include "servers/rendering_server.h"
 
 
-#include "dir_access_jandroid.h"
-#include "file_access_android.h"
-#include "file_access_filesystem_jandroid.h"
-#include "net_socket_android.h"
-
 #include <dlfcn.h>
 #include <dlfcn.h>
 #include <sys/system_properties.h>
 #include <sys/system_properties.h>
 
 
-#include "java_godot_io_wrapper.h"
-#include "java_godot_wrapper.h"
-
 const char *OS_Android::ANDROID_EXEC_PATH = "apk";
 const char *OS_Android::ANDROID_EXEC_PATH = "apk";
 
 
 String _remove_symlink(const String &dir) {
 String _remove_symlink(const String &dir) {

+ 1 - 0
platform/android/os_android.h

@@ -32,6 +32,7 @@
 #define OS_ANDROID_H
 #define OS_ANDROID_H
 
 
 #include "audio_driver_opensl.h"
 #include "audio_driver_opensl.h"
+
 #include "core/os/main_loop.h"
 #include "core/os/main_loop.h"
 #include "drivers/unix/os_unix.h"
 #include "drivers/unix/os_unix.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"

+ 7 - 6
platform/android/plugin/godot_plugin_jni.cpp

@@ -30,12 +30,13 @@
 
 
 #include "godot_plugin_jni.h"
 #include "godot_plugin_jni.h"
 
 
-#include <core/config/engine.h>
-#include <core/config/project_settings.h>
-#include <core/error/error_macros.h>
-#include <platform/android/api/jni_singleton.h>
-#include <platform/android/jni_utils.h>
-#include <platform/android/string_android.h>
+#include "api/jni_singleton.h"
+#include "jni_utils.h"
+#include "string_android.h"
+
+#include "core/config/engine.h"
+#include "core/config/project_settings.h"
+#include "core/error/error_macros.h"
 
 
 static HashMap<String, JNISingleton *> jni_singletons;
 static HashMap<String, JNISingleton *> jni_singletons;
 
 

+ 3 - 1
platform/android/string_android.h

@@ -31,8 +31,10 @@
 #ifndef STRING_ANDROID_H
 #ifndef STRING_ANDROID_H
 #define STRING_ANDROID_H
 #define STRING_ANDROID_H
 
 
-#include "core/string/ustring.h"
 #include "thread_jandroid.h"
 #include "thread_jandroid.h"
+
+#include "core/string/ustring.h"
+
 #include <jni.h>
 #include <jni.h>
 
 
 /**
 /**

+ 2 - 2
platform/android/thread_jandroid.cpp

@@ -30,10 +30,10 @@
 
 
 #include "thread_jandroid.h"
 #include "thread_jandroid.h"
 
 
-#include <android/log.h>
-
 #include "core/os/thread.h"
 #include "core/os/thread.h"
 
 
+#include <android/log.h>
+
 static JavaVM *java_vm = nullptr;
 static JavaVM *java_vm = nullptr;
 static thread_local JNIEnv *env = nullptr;
 static thread_local JNIEnv *env = nullptr;
 
 

+ 2 - 2
platform/android/vulkan/vulkan_context_android.cpp → platform/android/vulkan_context_android.cpp

@@ -28,10 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef VULKAN_ENABLED
-
 #include "vulkan_context_android.h"
 #include "vulkan_context_android.h"
 
 
+#ifdef VULKAN_ENABLED
+
 #ifdef USE_VOLK
 #ifdef USE_VOLK
 #include <volk.h>
 #include <volk.h>
 #else
 #else

+ 0 - 0
platform/android/vulkan/vulkan_context_android.h → platform/android/vulkan_context_android.h


+ 1 - 1
platform/ios/api/api.cpp

@@ -45,4 +45,4 @@ void unregister_ios_api() {
 void register_ios_api() {}
 void register_ios_api() {}
 void unregister_ios_api() {}
 void unregister_ios_api() {}
 
 
-#endif
+#endif // IOS_ENABLED

+ 5 - 4
platform/ios/app_delegate.mm

@@ -30,13 +30,14 @@
 
 
 #import "app_delegate.h"
 #import "app_delegate.h"
 
 
-#include "core/config/project_settings.h"
-#include "drivers/coreaudio/audio_driver_coreaudio.h"
 #import "godot_view.h"
 #import "godot_view.h"
-#include "main/main.h"
-#include "os_ios.h"
+#import "os_ios.h"
 #import "view_controller.h"
 #import "view_controller.h"
 
 
+#include "core/config/project_settings.h"
+#import "drivers/coreaudio/audio_driver_coreaudio.h"
+#include "main/main.h"
+
 #import <AVFoundation/AVFoundation.h>
 #import <AVFoundation/AVFoundation.h>
 #import <AudioToolbox/AudioServices.h>
 #import <AudioToolbox/AudioServices.h>
 
 

+ 3 - 2
platform/ios/display_layer.mm

@@ -30,11 +30,12 @@
 
 
 #import "display_layer.h"
 #import "display_layer.h"
 
 
+#import "display_server_ios.h"
+#import "os_ios.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
-#include "display_server_ios.h"
 #include "main/main.h"
 #include "main/main.h"
-#include "os_ios.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 
 
 #import <AudioToolbox/AudioServices.h>
 #import <AudioToolbox/AudioServices.h>

+ 3 - 3
platform/ios/display_server_ios.h

@@ -35,17 +35,17 @@
 #include "servers/display_server.h"
 #include "servers/display_server.h"
 
 
 #if defined(VULKAN_ENABLED)
 #if defined(VULKAN_ENABLED)
+#import "vulkan_context_ios.h"
+
 #include "drivers/vulkan/rendering_device_vulkan.h"
 #include "drivers/vulkan/rendering_device_vulkan.h"
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 
 
-#include "vulkan_context_ios.h"
-
 #ifdef USE_VOLK
 #ifdef USE_VOLK
 #include <volk.h>
 #include <volk.h>
 #else
 #else
 #include <vulkan/vulkan.h>
 #include <vulkan/vulkan.h>
 #endif
 #endif
-#endif
+#endif // VULKAN_ENABLED
 
 
 #if defined(GLES3_ENABLED)
 #if defined(GLES3_ENABLED)
 #include "drivers/gles3/rasterizer_gles3.h"
 #include "drivers/gles3/rasterizer_gles3.h"

+ 7 - 6
platform/ios/display_server_ios.mm

@@ -28,20 +28,21 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#include "display_server_ios.h"
+#import "display_server_ios.h"
 
 
 #import "app_delegate.h"
 #import "app_delegate.h"
-#include "core/config/project_settings.h"
-#include "core/io/file_access_pack.h"
 #import "device_metrics.h"
 #import "device_metrics.h"
 #import "godot_view.h"
 #import "godot_view.h"
-#include "ios.h"
+#import "ios.h"
 #import "key_mapping_ios.h"
 #import "key_mapping_ios.h"
 #import "keyboard_input_view.h"
 #import "keyboard_input_view.h"
-#include "os_ios.h"
-#include "tts_ios.h"
+#import "os_ios.h"
+#import "tts_ios.h"
 #import "view_controller.h"
 #import "view_controller.h"
 
 
+#include "core/config/project_settings.h"
+#include "core/io/file_access_pack.h"
+
 #import <sys/utsname.h>
 #import <sys/utsname.h>
 
 
 static const float kDisplayServerIOSAcceleration = 1.f;
 static const float kDisplayServerIOSAcceleration = 1.f;

+ 2 - 1
platform/ios/export/export.cpp

@@ -30,9 +30,10 @@
 
 
 #include "export.h"
 #include "export.h"
 
 
-#include "editor/export/editor_export.h"
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "editor/export/editor_export.h"
+
 void register_ios_exporter_types() {
 void register_ios_exporter_types() {
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformIOS);
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformIOS);
 }
 }

+ 2 - 1
platform/ios/export/export_plugin.cpp

@@ -30,11 +30,12 @@
 
 
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "../logo_svg.gen.h"
+
 #include "core/string/translation.h"
 #include "core/string/translation.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "platform/ios/logo_svg.gen.h"
 
 
 #include "modules/modules_enabled.gen.h" // For svg.
 #include "modules/modules_enabled.gen.h" // For svg.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED

+ 3 - 3
platform/ios/export/export_plugin.h

@@ -31,6 +31,8 @@
 #ifndef IOS_EXPORT_PLUGIN_H
 #ifndef IOS_EXPORT_PLUGIN_H
 #define IOS_EXPORT_PLUGIN_H
 #define IOS_EXPORT_PLUGIN_H
 
 
+#include "godot_plugin_config.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/io/image_loader.h"
 #include "core/io/image_loader.h"
@@ -43,10 +45,8 @@
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/export/editor_export_platform.h"
 #include "editor/export/editor_export_platform.h"
 #include "main/splash.gen.h"
 #include "main/splash.gen.h"
-#include "string.h"
-
-#include "godot_plugin_config.h"
 
 
+#include <string.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
 
 
 // Optional environment variables for defining confidential information. If any
 // Optional environment variables for defining confidential information. If any

+ 2 - 1
platform/ios/godot_ios.mm

@@ -28,9 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
+#import "os_ios.h"
+
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "main/main.h"
 #include "main/main.h"
-#include "os_ios.h"
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>

+ 4 - 3
platform/ios/godot_view.mm

@@ -30,12 +30,13 @@
 
 
 #import "godot_view.h"
 #import "godot_view.h"
 
 
+#import "display_layer.h"
+#import "display_server_ios.h"
+#import "godot_view_renderer.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
-#import "display_layer.h"
-#include "display_server_ios.h"
-#import "godot_view_renderer.h"
 
 
 #import <CoreMotion/CoreMotion.h>
 #import <CoreMotion/CoreMotion.h>
 
 

+ 3 - 2
platform/ios/godot_view_renderer.mm

@@ -30,11 +30,12 @@
 
 
 #import "godot_view_renderer.h"
 #import "godot_view_renderer.h"
 
 
+#import "display_server_ios.h"
+#import "os_ios.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
-#import "display_server_ios.h"
 #include "main/main.h"
 #include "main/main.h"
-#include "os_ios.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 
 
 #import <AudioToolbox/AudioServices.h>
 #import <AudioToolbox/AudioServices.h>

+ 1 - 0
platform/ios/ios.h

@@ -32,6 +32,7 @@
 #define IOS_H
 #define IOS_H
 
 
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
+
 #import <CoreHaptics/CoreHaptics.h>
 #import <CoreHaptics/CoreHaptics.h>
 
 
 class iOS : public Object {
 class iOS : public Object {

+ 1 - 1
platform/ios/ios.mm

@@ -28,7 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#include "ios.h"
+#import "ios.h"
 
 
 #import "app_delegate.h"
 #import "app_delegate.h"
 #import "view_controller.h"
 #import "view_controller.h"

+ 4 - 5
platform/ios/joypad_ios.mm

@@ -30,13 +30,12 @@
 
 
 #import "joypad_ios.h"
 #import "joypad_ios.h"
 
 
-#include "core/config/project_settings.h"
-#include "drivers/coreaudio/audio_driver_coreaudio.h"
-#include "main/main.h"
-
 #import "godot_view.h"
 #import "godot_view.h"
+#import "os_ios.h"
 
 
-#include "os_ios.h"
+#include "core/config/project_settings.h"
+#import "drivers/coreaudio/audio_driver_coreaudio.h"
+#include "main/main.h"
 
 
 JoypadIOS::JoypadIOS() {
 JoypadIOS::JoypadIOS() {
 	observer = [[JoypadIOSObserver alloc] init];
 	observer = [[JoypadIOSObserver alloc] init];

+ 1 - 1
platform/ios/key_mapping_ios.mm

@@ -28,7 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#include "key_mapping_ios.h"
+#import "key_mapping_ios.h"
 
 
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
 
 

+ 3 - 2
platform/ios/keyboard_input_view.mm

@@ -30,9 +30,10 @@
 
 
 #import "keyboard_input_view.h"
 #import "keyboard_input_view.h"
 
 
+#import "display_server_ios.h"
+#import "os_ios.h"
+
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
-#include "display_server_ios.h"
-#include "os_ios.h"
 
 
 @interface GodotKeyboardInputView () <UITextViewDelegate>
 @interface GodotKeyboardInputView () <UITextViewDelegate>
 
 

+ 6 - 4
platform/ios/os_ios.h

@@ -33,16 +33,18 @@
 
 
 #ifdef IOS_ENABLED
 #ifdef IOS_ENABLED
 
 
-#include "drivers/coreaudio/audio_driver_coreaudio.h"
+#import "ios.h"
+#import "joypad_ios.h"
+
+#import "drivers/coreaudio/audio_driver_coreaudio.h"
 #include "drivers/unix/os_unix.h"
 #include "drivers/unix/os_unix.h"
-#include "ios.h"
-#include "joypad_ios.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 #include "servers/rendering/renderer_compositor.h"
 #include "servers/rendering/renderer_compositor.h"
 
 
 #if defined(VULKAN_ENABLED)
 #if defined(VULKAN_ENABLED)
+#import "vulkan_context_ios.h"
+
 #include "drivers/vulkan/rendering_device_vulkan.h"
 #include "drivers/vulkan/rendering_device_vulkan.h"
-#include "platform/ios/vulkan_context_ios.h"
 #endif
 #endif
 
 
 class OS_IOS : public OS_Unix {
 class OS_IOS : public OS_Unix {

+ 7 - 5
platform/ios/os_ios.mm

@@ -28,20 +28,21 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef IOS_ENABLED
+#import "os_ios.h"
 
 
-#include "os_ios.h"
+#ifdef IOS_ENABLED
 
 
 #import "app_delegate.h"
 #import "app_delegate.h"
+#import "display_server_ios.h"
+#import "godot_view.h"
+#import "view_controller.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access_pack.h"
 #include "core/io/file_access_pack.h"
-#include "display_server_ios.h"
 #include "drivers/unix/syslog_logger.h"
 #include "drivers/unix/syslog_logger.h"
-#import "godot_view.h"
 #include "main/main.h"
 #include "main/main.h"
-#import "view_controller.h"
 
 
 #import <AudioToolbox/AudioServices.h>
 #import <AudioToolbox/AudioServices.h>
 #import <CoreText/CoreText.h>
 #import <CoreText/CoreText.h>
@@ -51,6 +52,7 @@
 
 
 #if defined(VULKAN_ENABLED)
 #if defined(VULKAN_ENABLED)
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
+
 #import <QuartzCore/CAMetalLayer.h>
 #import <QuartzCore/CAMetalLayer.h>
 #ifdef USE_VOLK
 #ifdef USE_VOLK
 #include <volk.h>
 #include <volk.h>

+ 6 - 6
platform/ios/tts_ios.h

@@ -31,18 +31,18 @@
 #ifndef TTS_IOS_H
 #ifndef TTS_IOS_H
 #define TTS_IOS_H
 #define TTS_IOS_H
 
 
-#if __has_include(<AVFAudio/AVSpeechSynthesis.h>)
-#import <AVFAudio/AVSpeechSynthesis.h>
-#else
-#import <AVFoundation/AVFoundation.h>
-#endif
-
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/list.h"
 #include "core/templates/list.h"
 #include "core/variant/array.h"
 #include "core/variant/array.h"
 #include "servers/display_server.h"
 #include "servers/display_server.h"
 
 
+#if __has_include(<AVFAudio/AVSpeechSynthesis.h>)
+#import <AVFAudio/AVSpeechSynthesis.h>
+#else
+#import <AVFoundation/AVFoundation.h>
+#endif
+
 @interface TTS_IOS : NSObject <AVSpeechSynthesizerDelegate> {
 @interface TTS_IOS : NSObject <AVSpeechSynthesizerDelegate> {
 	bool speaking;
 	bool speaking;
 	HashMap<id, int> ids;
 	HashMap<id, int> ids;

+ 1 - 1
platform/ios/tts_ios.mm

@@ -28,7 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#include "tts_ios.h"
+#import "tts_ios.h"
 
 
 @implementation TTS_IOS
 @implementation TTS_IOS
 
 

+ 5 - 3
platform/ios/view_controller.mm

@@ -29,13 +29,15 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #import "view_controller.h"
 #import "view_controller.h"
-#include "core/config/project_settings.h"
-#include "display_server_ios.h"
+
+#import "display_server_ios.h"
 #import "godot_view.h"
 #import "godot_view.h"
 #import "godot_view_renderer.h"
 #import "godot_view_renderer.h"
 #import "key_mapping_ios.h"
 #import "key_mapping_ios.h"
 #import "keyboard_input_view.h"
 #import "keyboard_input_view.h"
-#include "os_ios.h"
+#import "os_ios.h"
+
+#include "core/config/project_settings.h"
 
 
 #import <AVFoundation/AVFoundation.h>
 #import <AVFoundation/AVFoundation.h>
 #import <GameController/GameController.h>
 #import <GameController/GameController.h>

+ 2 - 1
platform/ios/vulkan_context_ios.mm

@@ -28,9 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
+#import "vulkan_context_ios.h"
+
 #ifdef VULKAN_ENABLED
 #ifdef VULKAN_ENABLED
 
 
-#include "vulkan_context_ios.h"
 #ifdef USE_VOLK
 #ifdef USE_VOLK
 #include <volk.h>
 #include <volk.h>
 #else
 #else

+ 2 - 1
platform/linuxbsd/export/export.cpp

@@ -30,9 +30,10 @@
 
 
 #include "export.h"
 #include "export.h"
 
 
-#include "editor/export/editor_export.h"
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "editor/export/editor_export.h"
+
 void register_linuxbsd_exporter_types() {
 void register_linuxbsd_exporter_types() {
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformLinuxBSD);
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformLinuxBSD);
 }
 }

+ 3 - 2
platform/linuxbsd/export/export_plugin.cpp

@@ -30,13 +30,14 @@
 
 
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "../logo_svg.gen.h"
+#include "../run_icon_svg.gen.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_paths.h"
 #include "editor/editor_paths.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "platform/linuxbsd/logo_svg.gen.h"
-#include "platform/linuxbsd/run_icon_svg.gen.h"
 
 
 #include "modules/modules_enabled.gen.h" // For svg.
 #include "modules/modules_enabled.gen.h" // For svg.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED

+ 1 - 2
platform/linuxbsd/freedesktop_portal_desktop.cpp

@@ -35,6 +35,7 @@
 #include "core/error/error_macros.h"
 #include "core/error/error_macros.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
+#include "core/variant/variant.h"
 
 
 #ifdef SOWRAP_ENABLED
 #ifdef SOWRAP_ENABLED
 #include "dbus-so_wrap.h"
 #include "dbus-so_wrap.h"
@@ -42,8 +43,6 @@
 #include <dbus/dbus.h>
 #include <dbus/dbus.h>
 #endif
 #endif
 
 
-#include "core/variant/variant.h"
-
 #define BUS_OBJECT_NAME "org.freedesktop.portal.Desktop"
 #define BUS_OBJECT_NAME "org.freedesktop.portal.Desktop"
 #define BUS_OBJECT_PATH "/org/freedesktop/portal/desktop"
 #define BUS_OBJECT_PATH "/org/freedesktop/portal/desktop"
 
 

+ 4 - 3
platform/linuxbsd/godot_linuxbsd.cpp

@@ -28,6 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
+#include "os_linuxbsd.h"
+
+#include "main/main.h"
+
 #include <limits.h>
 #include <limits.h>
 #include <locale.h>
 #include <locale.h>
 #include <stdlib.h>
 #include <stdlib.h>
@@ -37,9 +41,6 @@
 #include <sys/resource.h>
 #include <sys/resource.h>
 #endif
 #endif
 
 
-#include "main/main.h"
-#include "os_linuxbsd.h"
-
 int main(int argc, char *argv[]) {
 int main(int argc, char *argv[]) {
 #if defined(SANITIZERS_ENABLED)
 #if defined(SANITIZERS_ENABLED)
 	// Note: Set stack size to be at least 30 MB (vs 8 MB default) to avoid overflow, address sanitizer can increase stack usage up to 3 times.
 	// Note: Set stack size to be at least 30 MB (vs 8 MB default) to avoid overflow, address sanitizer can increase stack usage up to 3 times.

+ 1 - 0
platform/linuxbsd/joypad_linux.h

@@ -32,6 +32,7 @@
 #define JOYPAD_LINUX_H
 #define JOYPAD_LINUX_H
 
 
 #ifdef JOYDEV_ENABLED
 #ifdef JOYDEV_ENABLED
+
 #include "core/input/input.h"
 #include "core/input/input.h"
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"

+ 7 - 7
platform/linuxbsd/os_linuxbsd.cpp

@@ -35,17 +35,13 @@
 #include "main/main.h"
 #include "main/main.h"
 #include "servers/display_server.h"
 #include "servers/display_server.h"
 
 
-#include "modules/modules_enabled.gen.h" // For regex.
-#ifdef MODULE_REGEX_ENABLED
-#include "modules/regex/regex.h"
-#endif
-
 #ifdef X11_ENABLED
 #ifdef X11_ENABLED
 #include "x11/display_server_x11.h"
 #include "x11/display_server_x11.h"
 #endif
 #endif
 
 
-#ifdef HAVE_MNTENT
-#include <mntent.h>
+#include "modules/modules_enabled.gen.h" // For regex.
+#ifdef MODULE_REGEX_ENABLED
+#include "modules/regex/regex.h"
 #endif
 #endif
 
 
 #include <dlfcn.h>
 #include <dlfcn.h>
@@ -57,6 +53,10 @@
 #include <sys/utsname.h>
 #include <sys/utsname.h>
 #include <unistd.h>
 #include <unistd.h>
 
 
+#ifdef HAVE_MNTENT
+#include <mntent.h>
+#endif
+
 void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
 void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
 	const char *message_programs[] = { "zenity", "kdialog", "Xdialog", "xmessage" };
 	const char *message_programs[] = { "zenity", "kdialog", "Xdialog", "xmessage" };
 
 

+ 3 - 2
platform/linuxbsd/os_linuxbsd.h

@@ -31,13 +31,14 @@
 #ifndef OS_LINUXBSD_H
 #ifndef OS_LINUXBSD_H
 #define OS_LINUXBSD_H
 #define OS_LINUXBSD_H
 
 
-#include "core/input/input.h"
 #include "crash_handler_linuxbsd.h"
 #include "crash_handler_linuxbsd.h"
+#include "joypad_linux.h"
+
+#include "core/input/input.h"
 #include "drivers/alsa/audio_driver_alsa.h"
 #include "drivers/alsa/audio_driver_alsa.h"
 #include "drivers/alsamidi/midi_driver_alsamidi.h"
 #include "drivers/alsamidi/midi_driver_alsamidi.h"
 #include "drivers/pulseaudio/audio_driver_pulseaudio.h"
 #include "drivers/pulseaudio/audio_driver_pulseaudio.h"
 #include "drivers/unix/os_unix.h"
 #include "drivers/unix/os_unix.h"
-#include "joypad_linux.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 
 
 #ifdef FONTCONFIG_ENABLED
 #ifdef FONTCONFIG_ENABLED

+ 5 - 9
platform/linuxbsd/x11/detect_prime_x11.cpp

@@ -28,29 +28,26 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef X11_ENABLED
-#if defined(GLES3_ENABLED)
+#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
 
 
 #include "detect_prime_x11.h"
 #include "detect_prime_x11.h"
 
 
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 
 
-#include <stdlib.h>
-
 #include "thirdparty/glad/glad/gl.h"
 #include "thirdparty/glad/glad/gl.h"
 #include "thirdparty/glad/glad/glx.h"
 #include "thirdparty/glad/glad/glx.h"
 
 
 #ifdef SOWRAP_ENABLED
 #ifdef SOWRAP_ENABLED
-#include "dynwrappers/xlib-so_wrap.h"
+#include "x11/dynwrappers/xlib-so_wrap.h"
 #else
 #else
 #include <X11/XKBlib.h>
 #include <X11/XKBlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xutil.h>
 #endif
 #endif
 
 
-#include <cstring>
-
+#include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <unistd.h>
@@ -265,5 +262,4 @@ int detect_prime() {
 	return preferred;
 	return preferred;
 }
 }
 
 
-#endif
-#endif
+#endif // X11_ENABLED && GLES3_ENABLED

+ 6 - 5
platform/linuxbsd/x11/display_server_x11.cpp

@@ -32,12 +32,13 @@
 
 
 #ifdef X11_ENABLED
 #ifdef X11_ENABLED
 
 
+#include "x11/detect_prime_x11.h"
+#include "x11/key_mapping_x11.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/math/math_funcs.h"
 #include "core/math/math_funcs.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
-#include "detect_prime_x11.h"
-#include "key_mapping_x11.h"
 #include "main/main.h"
 #include "main/main.h"
 #include "scene/resources/texture.h"
 #include "scene/resources/texture.h"
 
 
@@ -58,6 +59,9 @@
 #include <sys/types.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <unistd.h>
 
 
+#undef CursorShape
+#include <X11/XKBlib.h>
+
 // ICCCM
 // ICCCM
 #define WM_NormalState 1L // window normal state
 #define WM_NormalState 1L // window normal state
 #define WM_IconicState 3L // window minimized
 #define WM_IconicState 3L // window minimized
@@ -65,9 +69,6 @@
 #define _NET_WM_STATE_REMOVE 0L // remove/unset property
 #define _NET_WM_STATE_REMOVE 0L // remove/unset property
 #define _NET_WM_STATE_ADD 1L // add/set property
 #define _NET_WM_STATE_ADD 1L // add/set property
 
 
-#undef CursorShape
-#include <X11/XKBlib.h>
-
 // 2.2 is the first release with multitouch
 // 2.2 is the first release with multitouch
 #define XINPUT_CLIENT_VERSION_MAJOR 2
 #define XINPUT_CLIENT_VERSION_MAJOR 2
 #define XINPUT_CLIENT_VERSION_MINOR 2
 #define XINPUT_CLIENT_VERSION_MINOR 2

+ 17 - 16
platform/linuxbsd/x11/display_server_x11.h

@@ -33,7 +33,7 @@
 
 
 #ifdef X11_ENABLED
 #ifdef X11_ENABLED
 
 
-#include "servers/display_server.h"
+#include "joypad_linux.h"
 
 
 #include "core/input/input.h"
 #include "core/input/input.h"
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
@@ -43,27 +43,28 @@
 #include "drivers/alsamidi/midi_driver_alsamidi.h"
 #include "drivers/alsamidi/midi_driver_alsamidi.h"
 #include "drivers/pulseaudio/audio_driver_pulseaudio.h"
 #include "drivers/pulseaudio/audio_driver_pulseaudio.h"
 #include "drivers/unix/os_unix.h"
 #include "drivers/unix/os_unix.h"
-#include "joypad_linux.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
+#include "servers/display_server.h"
 #include "servers/rendering/renderer_compositor.h"
 #include "servers/rendering/renderer_compositor.h"
 #include "servers/rendering_server.h"
 #include "servers/rendering_server.h"
 
 
 #if defined(SPEECHD_ENABLED)
 #if defined(SPEECHD_ENABLED)
-#include "../tts_linux.h"
+#include "tts_linux.h"
 #endif
 #endif
 
 
 #if defined(GLES3_ENABLED)
 #if defined(GLES3_ENABLED)
-#include "gl_manager_x11.h"
+#include "x11/gl_manager_x11.h"
 #endif
 #endif
 
 
 #if defined(VULKAN_ENABLED)
 #if defined(VULKAN_ENABLED)
+#include "x11/vulkan_context_x11.h"
+
 #include "drivers/vulkan/rendering_device_vulkan.h"
 #include "drivers/vulkan/rendering_device_vulkan.h"
-#include "vulkan_context_x11.h"
 #endif
 #endif
 
 
 #if defined(DBUS_ENABLED)
 #if defined(DBUS_ENABLED)
-#include "../freedesktop_portal_desktop.h"
-#include "../freedesktop_screensaver.h"
+#include "freedesktop_portal_desktop.h"
+#include "freedesktop_screensaver.h"
 #endif
 #endif
 
 
 #include <X11/Xatom.h>
 #include <X11/Xatom.h>
@@ -72,16 +73,16 @@
 #include <X11/keysym.h>
 #include <X11/keysym.h>
 
 
 #ifdef SOWRAP_ENABLED
 #ifdef SOWRAP_ENABLED
-#include "dynwrappers/xlib-so_wrap.h"
+#include "x11/dynwrappers/xlib-so_wrap.h"
 
 
-#include "dynwrappers/xcursor-so_wrap.h"
-#include "dynwrappers/xext-so_wrap.h"
-#include "dynwrappers/xinerama-so_wrap.h"
-#include "dynwrappers/xinput2-so_wrap.h"
-#include "dynwrappers/xrandr-so_wrap.h"
-#include "dynwrappers/xrender-so_wrap.h"
+#include "x11/dynwrappers/xcursor-so_wrap.h"
+#include "x11/dynwrappers/xext-so_wrap.h"
+#include "x11/dynwrappers/xinerama-so_wrap.h"
+#include "x11/dynwrappers/xinput2-so_wrap.h"
+#include "x11/dynwrappers/xrandr-so_wrap.h"
+#include "x11/dynwrappers/xrender-so_wrap.h"
 
 
-#include "../xkbcommon-so_wrap.h"
+#include "xkbcommon-so_wrap.h"
 #else
 #else
 #include <X11/XKBlib.h>
 #include <X11/XKBlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
@@ -521,6 +522,6 @@ public:
 	~DisplayServerX11();
 	~DisplayServerX11();
 };
 };
 
 
-#endif // X11 enabled
+#endif // X11_ENABLED
 
 
 #endif // DISPLAY_SERVER_X11_H
 #endif // DISPLAY_SERVER_X11_H

+ 4 - 6
platform/linuxbsd/x11/gl_manager_x11.cpp

@@ -30,15 +30,14 @@
 
 
 #include "gl_manager_x11.h"
 #include "gl_manager_x11.h"
 
 
-#ifdef X11_ENABLED
-#if defined(GLES3_ENABLED)
+#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
+
+#include "thirdparty/glad/glad/glx.h"
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <unistd.h>
 
 
-#include "thirdparty/glad/glad/glx.h"
-
 #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
 #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
 
 
@@ -403,5 +402,4 @@ GLManager_X11::~GLManager_X11() {
 	release_current();
 	release_current();
 }
 }
 
 
-#endif
-#endif
+#endif // X11_ENABLED && GLES3_ENABLED

+ 3 - 7
platform/linuxbsd/x11/gl_manager_x11.h

@@ -31,12 +31,11 @@
 #ifndef GL_MANAGER_X11_H
 #ifndef GL_MANAGER_X11_H
 #define GL_MANAGER_X11_H
 #define GL_MANAGER_X11_H
 
 
-#ifdef X11_ENABLED
-
-#ifdef GLES3_ENABLED
+#if defined(X11_ENABLED) && defined(GLES3_ENABLED)
 
 
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
+#include "servers/display_server.h"
 
 
 #ifdef SOWRAP_ENABLED
 #ifdef SOWRAP_ENABLED
 #include "dynwrappers/xlib-so_wrap.h"
 #include "dynwrappers/xlib-so_wrap.h"
@@ -53,8 +52,6 @@
 #include <X11/extensions/shape.h>
 #include <X11/extensions/shape.h>
 #endif
 #endif
 
 
-#include "servers/display_server.h"
-
 struct GLManager_X11_Private;
 struct GLManager_X11_Private;
 
 
 class GLManager_X11 {
 class GLManager_X11 {
@@ -136,7 +133,6 @@ public:
 	~GLManager_X11();
 	~GLManager_X11();
 };
 };
 
 
-#endif // GLES3_ENABLED
-#endif // X11_ENABLED
+#endif // X11_ENABLED && GLES3_ENABLED
 
 
 #endif // GL_MANAGER_X11_H
 #endif // GL_MANAGER_X11_H

+ 4 - 3
platform/linuxbsd/x11/key_mapping_x11.h

@@ -31,16 +31,17 @@
 #ifndef KEY_MAPPING_X11_H
 #ifndef KEY_MAPPING_X11_H
 #define KEY_MAPPING_X11_H
 #define KEY_MAPPING_X11_H
 
 
+#include "core/os/keyboard.h"
+#include "core/templates/hash_map.h"
+
 #include <X11/XF86keysym.h>
 #include <X11/XF86keysym.h>
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
+
 #define XK_MISCELLANY
 #define XK_MISCELLANY
 #define XK_LATIN1
 #define XK_LATIN1
 #define XK_XKB_KEYS
 #define XK_XKB_KEYS
 #include <X11/keysymdef.h>
 #include <X11/keysymdef.h>
 
 
-#include "core/os/keyboard.h"
-#include "core/templates/hash_map.h"
-
 class KeyMappingX11 {
 class KeyMappingX11 {
 	struct HashMapHasherKeys {
 	struct HashMapHasherKeys {
 		static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }
 		static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }

+ 1 - 0
platform/linuxbsd/x11/vulkan_context_x11.h

@@ -34,6 +34,7 @@
 #ifdef VULKAN_ENABLED
 #ifdef VULKAN_ENABLED
 
 
 #include "drivers/vulkan/vulkan_context.h"
 #include "drivers/vulkan/vulkan_context.h"
+
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
 
 
 class VulkanContextX11 : public VulkanContext {
 class VulkanContextX11 : public VulkanContext {

+ 4 - 3
platform/macos/display_server_macos.h

@@ -31,8 +31,6 @@
 #ifndef DISPLAY_SERVER_MACOS_H
 #ifndef DISPLAY_SERVER_MACOS_H
 #define DISPLAY_SERVER_MACOS_H
 #define DISPLAY_SERVER_MACOS_H
 
 
-#define BitMap _QDBitMap // Suppress deprecated QuickDraw definition.
-
 #include "core/input/input.h"
 #include "core/input/input.h"
 #include "servers/display_server.h"
 #include "servers/display_server.h"
 
 
@@ -41,10 +39,13 @@
 #endif // GLES3_ENABLED
 #endif // GLES3_ENABLED
 
 
 #if defined(VULKAN_ENABLED)
 #if defined(VULKAN_ENABLED)
+#include "vulkan_context_macos.h"
+
 #include "drivers/vulkan/rendering_device_vulkan.h"
 #include "drivers/vulkan/rendering_device_vulkan.h"
-#include "platform/macos/vulkan_context_macos.h"
 #endif // VULKAN_ENABLED
 #endif // VULKAN_ENABLED
 
 
+#define BitMap _QDBitMap // Suppress deprecated QuickDraw definition.
+
 #import <AppKit/AppKit.h>
 #import <AppKit/AppKit.h>
 #import <AppKit/NSCursor.h>
 #import <AppKit/NSCursor.h>
 #import <ApplicationServices/ApplicationServices.h>
 #import <ApplicationServices/ApplicationServices.h>

+ 7 - 8
platform/macos/display_server_macos.mm

@@ -38,7 +38,6 @@
 #include "godot_window_delegate.h"
 #include "godot_window_delegate.h"
 #include "key_mapping_macos.h"
 #include "key_mapping_macos.h"
 #include "os_macos.h"
 #include "os_macos.h"
-
 #include "tts_macos.h"
 #include "tts_macos.h"
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
@@ -48,13 +47,6 @@
 #include "main/main.h"
 #include "main/main.h"
 #include "scene/resources/texture.h"
 #include "scene/resources/texture.h"
 
 
-#import <Carbon/Carbon.h>
-#import <Cocoa/Cocoa.h>
-#import <IOKit/IOCFPlugIn.h>
-#import <IOKit/IOKitLib.h>
-#import <IOKit/hid/IOHIDKeys.h>
-#import <IOKit/hid/IOHIDLib.h>
-
 #if defined(GLES3_ENABLED)
 #if defined(GLES3_ENABLED)
 #include "drivers/gles3/rasterizer_gles3.h"
 #include "drivers/gles3/rasterizer_gles3.h"
 #endif
 #endif
@@ -63,6 +55,13 @@
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 #include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
 #endif
 #endif
 
 
+#import <Carbon/Carbon.h>
+#import <Cocoa/Cocoa.h>
+#import <IOKit/IOCFPlugIn.h>
+#import <IOKit/IOKitLib.h>
+#import <IOKit/hid/IOHIDKeys.h>
+#import <IOKit/hid/IOHIDLib.h>
+
 const NSMenu *DisplayServerMacOS::_get_menu_root(const String &p_menu_root) const {
 const NSMenu *DisplayServerMacOS::_get_menu_root(const String &p_menu_root) const {
 	const NSMenu *menu = nullptr;
 	const NSMenu *menu = nullptr;
 	if (p_menu_root == "" || p_menu_root.to_lower() == "_main") {
 	if (p_menu_root == "" || p_menu_root.to_lower() == "_main") {

+ 2 - 2
platform/macos/export/codesign.h

@@ -41,6 +41,8 @@
 //  - Requirements code generator is not implemented (only hard-coded requirements for the ad-hoc signing is supported).
 //  - Requirements code generator is not implemented (only hard-coded requirements for the ad-hoc signing is supported).
 //  - RFC5652/CMS blob generation is not implemented, supports ad-hoc signing only.
 //  - RFC5652/CMS blob generation is not implemented, supports ad-hoc signing only.
 
 
+#include "plist.h"
+
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
@@ -51,8 +53,6 @@
 #include "modules/regex/regex.h"
 #include "modules/regex/regex.h"
 #endif
 #endif
 
 
-#include "plist.h"
-
 #ifdef MODULE_REGEX_ENABLED
 #ifdef MODULE_REGEX_ENABLED
 
 
 /*************************************************************************/
 /*************************************************************************/

+ 2 - 2
platform/macos/export/export_plugin.cpp

@@ -30,6 +30,8 @@
 
 
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "../logo_svg.gen.h"
+#include "../run_icon_svg.gen.h"
 #include "codesign.h"
 #include "codesign.h"
 #include "lipo.h"
 #include "lipo.h"
 #include "macho.h"
 #include "macho.h"
@@ -39,8 +41,6 @@
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_paths.h"
 #include "editor/editor_paths.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
-#include "platform/macos/logo_svg.gen.h"
-#include "platform/macos/run_icon_svg.gen.h"
 
 
 #include "modules/modules_enabled.gen.h" // For svg and regex.
 #include "modules/modules_enabled.gen.h" // For svg and regex.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED

+ 2 - 2
platform/macos/export/lipo.h

@@ -33,11 +33,11 @@
 
 
 // Universal / Universal 2 fat binary file creator and extractor.
 // Universal / Universal 2 fat binary file creator and extractor.
 
 
+#include "macho.h"
+
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
 
 
-#include "macho.h"
-
 class LipO : public RefCounted {
 class LipO : public RefCounted {
 	struct FatArch {
 	struct FatArch {
 		uint32_t cputype;
 		uint32_t cputype;

+ 3 - 3
platform/macos/gl_manager_macos_legacy.h

@@ -33,9 +33,6 @@
 
 
 #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED)
 #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED)
 
 
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
-
 #include "core/error/error_list.h"
 #include "core/error/error_list.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
@@ -45,6 +42,9 @@
 #import <ApplicationServices/ApplicationServices.h>
 #import <ApplicationServices/ApplicationServices.h>
 #import <CoreVideo/CoreVideo.h>
 #import <CoreVideo/CoreVideo.h>
 
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
+
 class GLManager_MacOS {
 class GLManager_MacOS {
 public:
 public:
 	enum ContextType {
 	enum ContextType {

+ 5 - 7
platform/macos/gl_manager_macos_legacy.mm

@@ -30,15 +30,14 @@
 
 
 #include "gl_manager_macos_legacy.h"
 #include "gl_manager_macos_legacy.h"
 
 
-#ifdef MACOS_ENABLED
-#ifdef GLES3_ENABLED
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
+#if defined(MACOS_ENABLED) && defined(GLES3_ENABLED)
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
+
 Error GLManager_MacOS::create_context(GLWindow &win) {
 Error GLManager_MacOS::create_context(GLWindow &win) {
 	NSOpenGLPixelFormatAttribute attributes[] = {
 	NSOpenGLPixelFormatAttribute attributes[] = {
 		NSOpenGLPFADoubleBuffer,
 		NSOpenGLPFADoubleBuffer,
@@ -237,5 +236,4 @@ GLManager_MacOS::~GLManager_MacOS() {
 
 
 #pragma clang diagnostic pop
 #pragma clang diagnostic pop
 
 
-#endif // GLES3_ENABLED
-#endif // MACOS_ENABLED
+#endif // MACOS_ENABLED && GLES3_ENABLED

+ 1 - 0
platform/macos/godot_content_view.mm

@@ -32,6 +32,7 @@
 
 
 #include "display_server_macos.h"
 #include "display_server_macos.h"
 #include "key_mapping_macos.h"
 #include "key_mapping_macos.h"
+
 #include "main/main.h"
 #include "main/main.h"
 
 
 @implementation GodotContentLayerDelegate
 @implementation GodotContentLayerDelegate

+ 2 - 2
platform/macos/godot_main_macos.mm

@@ -28,10 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#include "main/main.h"
-
 #include "os_macos.h"
 #include "os_macos.h"
 
 
+#include "main/main.h"
+
 #include <string.h>
 #include <string.h>
 #include <unistd.h>
 #include <unistd.h>
 
 

+ 2 - 2
platform/macos/joypad_macos.h

@@ -31,13 +31,13 @@
 #ifndef JOYPAD_MACOS_H
 #ifndef JOYPAD_MACOS_H
 #define JOYPAD_MACOS_H
 #define JOYPAD_MACOS_H
 
 
+#include "core/input/input.h"
+
 #import <ForceFeedback/ForceFeedback.h>
 #import <ForceFeedback/ForceFeedback.h>
 #import <ForceFeedback/ForceFeedbackConstants.h>
 #import <ForceFeedback/ForceFeedbackConstants.h>
 #import <IOKit/hid/IOHIDLib.h>
 #import <IOKit/hid/IOHIDLib.h>
 #import <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
 #import <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
 
 
-#include "core/input/input.h"
-
 struct rec_element {
 struct rec_element {
 	IOHIDElementRef ref;
 	IOHIDElementRef ref;
 	IOHIDElementCookie cookie;
 	IOHIDElementCookie cookie;

+ 3 - 3
platform/macos/key_mapping_macos.mm

@@ -30,12 +30,12 @@
 
 
 #include "key_mapping_macos.h"
 #include "key_mapping_macos.h"
 
 
-#import <Carbon/Carbon.h>
-#import <Cocoa/Cocoa.h>
-
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_map.h"
 #include "core/templates/hash_set.h"
 #include "core/templates/hash_set.h"
 
 
+#import <Carbon/Carbon.h>
+#import <Cocoa/Cocoa.h>
+
 struct HashMapHasherKeys {
 struct HashMapHasherKeys {
 	static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }
 	static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); }
 	static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); }
 	static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); }

+ 5 - 4
platform/macos/os_macos.h

@@ -31,12 +31,13 @@
 #ifndef OS_MACOS_H
 #ifndef OS_MACOS_H
 #define OS_MACOS_H
 #define OS_MACOS_H
 
 
-#include "core/input/input.h"
 #include "crash_handler_macos.h"
 #include "crash_handler_macos.h"
-#include "drivers/coreaudio/audio_driver_coreaudio.h"
-#include "drivers/coremidi/midi_driver_coremidi.h"
-#include "drivers/unix/os_unix.h"
 #include "joypad_macos.h"
 #include "joypad_macos.h"
+
+#include "core/input/input.h"
+#import "drivers/coreaudio/audio_driver_coreaudio.h"
+#import "drivers/coremidi/midi_driver_coremidi.h"
+#include "drivers/unix/os_unix.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 
 
 class OS_MacOS : public OS_Unix {
 class OS_MacOS : public OS_Unix {

+ 4 - 4
platform/macos/os_macos.mm

@@ -30,16 +30,16 @@
 
 
 #include "os_macos.h"
 #include "os_macos.h"
 
 
-#include "core/crypto/crypto_core.h"
-#include "core/version_generated.gen.h"
-#include "main/main.h"
-
 #include "dir_access_macos.h"
 #include "dir_access_macos.h"
 #include "display_server_macos.h"
 #include "display_server_macos.h"
 #include "godot_application.h"
 #include "godot_application.h"
 #include "godot_application_delegate.h"
 #include "godot_application_delegate.h"
 #include "macos_terminal_logger.h"
 #include "macos_terminal_logger.h"
 
 
+#include "core/crypto/crypto_core.h"
+#include "core/version_generated.gen.h"
+#include "main/main.h"
+
 #include <dlfcn.h>
 #include <dlfcn.h>
 #include <libproc.h>
 #include <libproc.h>
 #include <mach-o/dyld.h>
 #include <mach-o/dyld.h>

+ 1 - 0
platform/macos/vulkan_context_macos.h

@@ -34,6 +34,7 @@
 #ifdef VULKAN_ENABLED
 #ifdef VULKAN_ENABLED
 
 
 #include "drivers/vulkan/vulkan_context.h"
 #include "drivers/vulkan/vulkan_context.h"
+
 #import <AppKit/AppKit.h>
 #import <AppKit/AppKit.h>
 
 
 class VulkanContextMacOS : public VulkanContext {
 class VulkanContextMacOS : public VulkanContext {

+ 3 - 1
platform/macos/vulkan_context_macos.mm

@@ -28,8 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#ifdef VULKAN_ENABLED
 #include "vulkan_context_macos.h"
 #include "vulkan_context_macos.h"
+
+#ifdef VULKAN_ENABLED
+
 #ifdef USE_VOLK
 #ifdef USE_VOLK
 #include <volk.h>
 #include <volk.h>
 #else
 #else

+ 0 - 5
platform/uwp/app_uwp.cpp

@@ -28,17 +28,12 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-//
-// This file demonstrates how to initialize EGL in a Windows Store app, using ICoreWindow.
-//
-
 #include "app_uwp.h"
 #include "app_uwp.h"
 
 
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
 #include "main/main.h"
 #include "main/main.h"
-
 #include "platform/windows/key_mapping_windows.h"
 #include "platform/windows/key_mapping_windows.h"
 
 
 #include <collection.h>
 #include <collection.h>

+ 3 - 4
platform/uwp/app_uwp.h

@@ -31,12 +31,11 @@
 #ifndef APP_UWP_H
 #ifndef APP_UWP_H
 #define APP_UWP_H
 #define APP_UWP_H
 
 
-#include <string>
+#include "os_uwp.h"
 
 
+#include <GLES2/gl2.h>
 #include <wrl.h>
 #include <wrl.h>
-
-#include "GLES2/gl2.h"
-#include "os_uwp.h"
+#include <string>
 
 
 /** clang-format does not play nice with this C++/CX hybrid, needs investigation. */
 /** clang-format does not play nice with this C++/CX hybrid, needs investigation. */
 /* clang-format off */
 /* clang-format off */

+ 1 - 1
platform/uwp/context_egl_uwp.cpp

@@ -30,7 +30,7 @@
 
 
 #include "context_egl_uwp.h"
 #include "context_egl_uwp.h"
 
 
-#include "EGL/eglext.h"
+#include <EGL/eglext.h>
 
 
 using Platform::Exception;
 using Platform::Exception;
 
 

+ 3 - 4
platform/uwp/context_egl_uwp.h

@@ -31,13 +31,12 @@
 #ifndef CONTEXT_EGL_UWP_H
 #ifndef CONTEXT_EGL_UWP_H
 #define CONTEXT_EGL_UWP_H
 #define CONTEXT_EGL_UWP_H
 
 
-#include <wrl.h>
-
-#include <EGL/egl.h>
-
 #include "core/error/error_list.h"
 #include "core/error/error_list.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 
 
+#include <EGL/egl.h>
+#include <wrl.h>
+
 using namespace Windows::UI::Core;
 using namespace Windows::UI::Core;
 
 
 class ContextEGL_UWP {
 class ContextEGL_UWP {

+ 2 - 1
platform/uwp/export/export.cpp

@@ -30,9 +30,10 @@
 
 
 #include "export.h"
 #include "export.h"
 
 
+#include "export_plugin.h"
+
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "export_plugin.h"
 
 
 void register_uwp_exporter_types() {
 void register_uwp_exporter_types() {
 	// GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformUWP);
 	// GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformUWP);

+ 2 - 1
platform/uwp/export/export_plugin.cpp

@@ -30,9 +30,10 @@
 
 
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "../logo_svg.gen.h"
+
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
-#include "platform/uwp/logo_svg.gen.h"
 
 
 #include "modules/modules_enabled.gen.h" // For svg and regex.
 #include "modules/modules_enabled.gen.h" // For svg and regex.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED

+ 2 - 2
platform/uwp/export/export_plugin.h

@@ -31,6 +31,8 @@
 #ifndef UWP_EXPORT_PLUGIN_H
 #ifndef UWP_EXPORT_PLUGIN_H
 #define UWP_EXPORT_PLUGIN_H
 #define UWP_EXPORT_PLUGIN_H
 
 
+#include "app_packager.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
@@ -46,8 +48,6 @@
 #include "thirdparty/minizip/unzip.h"
 #include "thirdparty/minizip/unzip.h"
 #include "thirdparty/minizip/zip.h"
 #include "thirdparty/minizip/zip.h"
 
 
-#include "app_packager.h"
-
 #include <zlib.h>
 #include <zlib.h>
 
 
 // Capabilities
 // Capabilities

+ 2 - 1
platform/uwp/os_uwp.h

@@ -32,12 +32,13 @@
 #define OS_UWP_H
 #define OS_UWP_H
 
 
 #include "context_egl_uwp.h"
 #include "context_egl_uwp.h"
+#include "joypad_uwp.h"
+
 #include "core/input/input.h"
 #include "core/input/input.h"
 #include "core/math/transform_2d.h"
 #include "core/math/transform_2d.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "drivers/xaudio2/audio_driver_xaudio2.h"
 #include "drivers/xaudio2/audio_driver_xaudio2.h"
-#include "joypad_uwp.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 #include "servers/rendering/renderer_compositor.h"
 #include "servers/rendering/renderer_compositor.h"
 #include "servers/rendering_server.h"
 #include "servers/rendering_server.h"

+ 11 - 1
platform/web/api/api.cpp

@@ -29,10 +29,12 @@
 /**************************************************************************/
 /**************************************************************************/
 
 
 #include "api.h"
 #include "api.h"
-#include "core/config/engine.h"
+
 #include "javascript_bridge_singleton.h"
 #include "javascript_bridge_singleton.h"
 #include "web_tools_editor_plugin.h"
 #include "web_tools_editor_plugin.h"
 
 
+#include "core/config/engine.h"
+
 static JavaScriptBridge *javascript_bridge_singleton;
 static JavaScriptBridge *javascript_bridge_singleton;
 
 
 void register_web_api() {
 void register_web_api() {
@@ -78,6 +80,7 @@ void JavaScriptBridge::_bind_methods() {
 }
 }
 
 
 #if !defined(WEB_ENABLED) || !defined(JAVASCRIPT_EVAL_ENABLED)
 #if !defined(WEB_ENABLED) || !defined(JAVASCRIPT_EVAL_ENABLED)
+
 Variant JavaScriptBridge::eval(const String &p_code, bool p_use_global_exec_context) {
 Variant JavaScriptBridge::eval(const String &p_code, bool p_use_global_exec_context) {
 	return Variant();
 	return Variant();
 }
 }
@@ -104,16 +107,23 @@ Variant JavaScriptBridge::_create_object_bind(const Variant **p_args, int p_argc
 	}
 	}
 	return Ref<JavaScriptObject>();
 	return Ref<JavaScriptObject>();
 }
 }
+
 #endif
 #endif
+
 #if !defined(WEB_ENABLED)
 #if !defined(WEB_ENABLED)
+
 bool JavaScriptBridge::pwa_needs_update() const {
 bool JavaScriptBridge::pwa_needs_update() const {
 	return false;
 	return false;
 }
 }
+
 Error JavaScriptBridge::pwa_update() {
 Error JavaScriptBridge::pwa_update() {
 	return ERR_UNAVAILABLE;
 	return ERR_UNAVAILABLE;
 }
 }
+
 void JavaScriptBridge::force_fs_sync() {
 void JavaScriptBridge::force_fs_sync() {
 }
 }
+
 void JavaScriptBridge::download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime) {
 void JavaScriptBridge::download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime) {
 }
 }
+
 #endif
 #endif

+ 4 - 2
platform/web/api/web_tools_editor_plugin.cpp

@@ -28,9 +28,10 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
 /**************************************************************************/
 /**************************************************************************/
 
 
-#if defined(TOOLS_ENABLED) && defined(WEB_ENABLED)
 #include "web_tools_editor_plugin.h"
 #include "web_tools_editor_plugin.h"
 
 
+#if defined(TOOLS_ENABLED) && defined(WEB_ENABLED)
+
 #include "core/config/engine.h"
 #include "core/config/engine.h"
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
@@ -154,4 +155,5 @@ void WebToolsEditorPlugin::_zip_recursive(String p_path, String p_base_path, zip
 		cur = dir->get_next();
 		cur = dir->get_next();
 	}
 	}
 }
 }
-#endif
+
+#endif // TOOLS_ENABLED && WEB_ENABLED

+ 5 - 1
platform/web/api/web_tools_editor_plugin.h

@@ -32,6 +32,7 @@
 #define WEB_TOOLS_EDITOR_PLUGIN_H
 #define WEB_TOOLS_EDITOR_PLUGIN_H
 
 
 #if defined(TOOLS_ENABLED) && defined(WEB_ENABLED)
 #if defined(TOOLS_ENABLED) && defined(WEB_ENABLED)
+
 #include "core/io/zip_io.h"
 #include "core/io/zip_io.h"
 #include "editor/editor_plugin.h"
 #include "editor/editor_plugin.h"
 
 
@@ -48,11 +49,14 @@ public:
 
 
 	WebToolsEditorPlugin();
 	WebToolsEditorPlugin();
 };
 };
+
 #else
 #else
+
 class WebToolsEditorPlugin {
 class WebToolsEditorPlugin {
 public:
 public:
 	static void initialize() {}
 	static void initialize() {}
 };
 };
-#endif
+
+#endif // TOOLS_ENABLED && WEB_ENABLED
 
 
 #endif // WEB_TOOLS_EDITOR_PLUGIN_H
 #endif // WEB_TOOLS_EDITOR_PLUGIN_H

+ 2 - 2
platform/web/audio_driver_web.h

@@ -31,12 +31,12 @@
 #ifndef AUDIO_DRIVER_WEB_H
 #ifndef AUDIO_DRIVER_WEB_H
 #define AUDIO_DRIVER_WEB_H
 #define AUDIO_DRIVER_WEB_H
 
 
+#include "godot_audio.h"
+
 #include "core/os/mutex.h"
 #include "core/os/mutex.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 
 
-#include "godot_audio.h"
-
 class AudioDriverWeb : public AudioDriver {
 class AudioDriverWeb : public AudioDriver {
 private:
 private:
 	struct AudioContext {
 	struct AudioContext {

+ 6 - 5
platform/web/display_server_web.cpp

@@ -30,19 +30,20 @@
 
 
 #include "display_server_web.h"
 #include "display_server_web.h"
 
 
+#include "dom_keys.inc"
+#include "godot_js.h"
+#include "os_web.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
+#include "servers/rendering/dummy/rasterizer_dummy.h"
+
 #ifdef GLES3_ENABLED
 #ifdef GLES3_ENABLED
 #include "drivers/gles3/rasterizer_gles3.h"
 #include "drivers/gles3/rasterizer_gles3.h"
 #endif
 #endif
-#include "platform/web/os_web.h"
-#include "servers/rendering/dummy/rasterizer_dummy.h"
 
 
 #include <emscripten.h>
 #include <emscripten.h>
 #include <png.h>
 #include <png.h>
 
 
-#include "dom_keys.inc"
-#include "godot_js.h"
-
 #define DOM_BUTTON_LEFT 0
 #define DOM_BUTTON_LEFT 0
 #define DOM_BUTTON_MIDDLE 1
 #define DOM_BUTTON_MIDDLE 1
 #define DOM_BUTTON_RIGHT 2
 #define DOM_BUTTON_RIGHT 2

+ 2 - 1
platform/web/export/export.cpp

@@ -30,9 +30,10 @@
 
 
 #include "export.h"
 #include "export.h"
 
 
+#include "export_plugin.h"
+
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "export_plugin.h"
 
 
 void register_web_exporter_types() {
 void register_web_exporter_types() {
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformWeb);
 	GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformWeb);

+ 3 - 2
platform/web/export/export_plugin.cpp

@@ -30,12 +30,13 @@
 
 
 #include "export_plugin.h"
 #include "export_plugin.h"
 
 
+#include "../logo_svg.gen.h"
+#include "../run_icon_svg.gen.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/export/editor_export.h"
 #include "editor/export/editor_export.h"
-#include "platform/web/logo_svg.gen.h"
-#include "platform/web/run_icon_svg.gen.h"
 
 
 #include "modules/modules_enabled.gen.h" // For svg.
 #include "modules/modules_enabled.gen.h" // For svg.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED

+ 2 - 1
platform/web/export/export_plugin.h

@@ -31,6 +31,8 @@
 #ifndef WEB_EXPORT_PLUGIN_H
 #ifndef WEB_EXPORT_PLUGIN_H
 #define WEB_EXPORT_PLUGIN_H
 #define WEB_EXPORT_PLUGIN_H
 
 
+#include "editor_http_server.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/image_loader.h"
 #include "core/io/image_loader.h"
 #include "core/io/stream_peer_tls.h"
 #include "core/io/stream_peer_tls.h"
@@ -38,7 +40,6 @@
 #include "core/io/zip_io.h"
 #include "core/io/zip_io.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/export/editor_export_platform.h"
 #include "editor/export/editor_export_platform.h"
-#include "editor_http_server.h"
 #include "main/splash.gen.h"
 #include "main/splash.gen.h"
 
 
 class EditorExportPlatformWeb : public EditorExportPlatform {
 class EditorExportPlatformWeb : public EditorExportPlatform {

+ 2 - 1
platform/web/godot_audio.h

@@ -35,7 +35,8 @@
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-#include "stddef.h"
+#include <stddef.h>
+#include <stdint.h>
 
 
 extern int godot_audio_is_available();
 extern int godot_audio_is_available();
 extern int godot_audio_has_worklet();
 extern int godot_audio_has_worklet();

+ 1 - 1
platform/web/godot_js.h

@@ -35,7 +35,7 @@
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-#include "stddef.h"
+#include <stddef.h>
 
 
 // Config
 // Config
 extern void godot_js_config_locale_get(char *p_ptr, int p_ptr_max);
 extern void godot_js_config_locale_get(char *p_ptr, int p_ptr_max);

+ 2 - 2
platform/web/godot_webgl2.h

@@ -31,8 +31,8 @@
 #ifndef GODOT_WEBGL2_H
 #ifndef GODOT_WEBGL2_H
 #define GODOT_WEBGL2_H
 #define GODOT_WEBGL2_H
 
 
-#include "GLES3/gl3.h"
-#include "webgl/webgl2.h"
+#include <GLES3/gl3.h>
+#include <webgl/webgl2.h>
 
 
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632

+ 1 - 1
platform/web/http_client_web.h

@@ -37,7 +37,7 @@
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-#include "stddef.h"
+#include <stddef.h>
 
 
 typedef enum {
 typedef enum {
 	GODOT_JS_FETCH_STATE_REQUESTING = 0,
 	GODOT_JS_FETCH_STATE_REQUESTING = 0,

+ 3 - 1
platform/web/javascript_bridge_singleton.cpp

@@ -30,9 +30,10 @@
 
 
 #include "api/javascript_bridge_singleton.h"
 #include "api/javascript_bridge_singleton.h"
 
 
-#include "emscripten.h"
 #include "os_web.h"
 #include "os_web.h"
 
 
+#include <emscripten.h>
+
 extern "C" {
 extern "C" {
 extern void godot_js_os_download_buffer(const uint8_t *p_buf, int p_buf_size, const char *p_name, const char *p_mime);
 extern void godot_js_os_download_buffer(const uint8_t *p_buf, int p_buf_size, const char *p_name, const char *p_mime);
 }
 }
@@ -352,6 +353,7 @@ Variant JavaScriptBridge::eval(const String &p_code, bool p_use_global_exec_cont
 			return Variant();
 			return Variant();
 	}
 	}
 }
 }
+
 #endif // JAVASCRIPT_EVAL_ENABLED
 #endif // JAVASCRIPT_EVAL_ENABLED
 
 
 void JavaScriptBridge::download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime) {
 void JavaScriptBridge::download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime) {

+ 4 - 4
platform/web/os_web.cpp

@@ -30,12 +30,15 @@
 
 
 #include "os_web.h"
 #include "os_web.h"
 
 
+#include "api/javascript_bridge_singleton.h"
+#include "display_server_web.h"
+#include "godot_js.h"
+
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/debugger/engine_debugger.h"
 #include "core/debugger/engine_debugger.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/file_access_unix.h"
 #include "drivers/unix/file_access_unix.h"
 #include "main/main.h"
 #include "main/main.h"
-#include "platform/web/display_server_web.h"
 
 
 #include "modules/modules_enabled.gen.h" // For websocket.
 #include "modules/modules_enabled.gen.h" // For websocket.
 
 
@@ -43,9 +46,6 @@
 #include <emscripten.h>
 #include <emscripten.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
-#include "api/javascript_bridge_singleton.h"
-#include "godot_js.h"
-
 void OS_Web::alert(const String &p_alert, const String &p_title) {
 void OS_Web::alert(const String &p_alert, const String &p_title) {
 	godot_js_display_alert(p_alert.utf8().get_data());
 	godot_js_display_alert(p_alert.utf8().get_data());
 }
 }

部分文件因文件數量過多而無法顯示