diff options
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/export/export.cpp | 3 | ||||
-rw-r--r-- | platform/linuxbsd/export/export_plugin.cpp | 5 | ||||
-rw-r--r-- | platform/linuxbsd/freedesktop_portal_desktop.cpp | 3 | ||||
-rw-r--r-- | platform/linuxbsd/godot_linuxbsd.cpp | 7 | ||||
-rw-r--r-- | platform/linuxbsd/joypad_linux.h | 1 | ||||
-rw-r--r-- | platform/linuxbsd/os_linuxbsd.cpp | 14 | ||||
-rw-r--r-- | platform/linuxbsd/os_linuxbsd.h | 5 | ||||
-rw-r--r-- | platform/linuxbsd/x11/detect_prime_x11.cpp | 14 | ||||
-rw-r--r-- | platform/linuxbsd/x11/display_server_x11.cpp | 13 | ||||
-rw-r--r-- | platform/linuxbsd/x11/display_server_x11.h | 33 | ||||
-rw-r--r-- | platform/linuxbsd/x11/gl_manager_x11.cpp | 10 | ||||
-rw-r--r-- | platform/linuxbsd/x11/gl_manager_x11.h | 10 | ||||
-rw-r--r-- | platform/linuxbsd/x11/key_mapping_x11.h | 7 | ||||
-rw-r--r-- | platform/linuxbsd/x11/vulkan_context_x11.h | 1 |
14 files changed, 62 insertions, 64 deletions
diff --git a/platform/linuxbsd/export/export.cpp b/platform/linuxbsd/export/export.cpp index 09f354246d..f72c079d1d 100644 --- a/platform/linuxbsd/export/export.cpp +++ b/platform/linuxbsd/export/export.cpp @@ -30,9 +30,10 @@ #include "export.h" -#include "editor/export/editor_export.h" #include "export_plugin.h" +#include "editor/export/editor_export.h" + void register_linuxbsd_exporter_types() { GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformLinuxBSD); } diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp index 9544cc761d..daa2664b09 100644 --- a/platform/linuxbsd/export/export_plugin.cpp +++ b/platform/linuxbsd/export/export_plugin.cpp @@ -30,13 +30,14 @@ #include "export_plugin.h" +#include "../logo_svg.gen.h" +#include "../run_icon_svg.gen.h" + #include "core/config/project_settings.h" #include "editor/editor_node.h" #include "editor/editor_paths.h" #include "editor/editor_scale.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. #ifdef MODULE_SVG_ENABLED diff --git a/platform/linuxbsd/freedesktop_portal_desktop.cpp b/platform/linuxbsd/freedesktop_portal_desktop.cpp index 6dfa8ed93c..c3cb0f411d 100644 --- a/platform/linuxbsd/freedesktop_portal_desktop.cpp +++ b/platform/linuxbsd/freedesktop_portal_desktop.cpp @@ -35,6 +35,7 @@ #include "core/error/error_macros.h" #include "core/os/os.h" #include "core/string/ustring.h" +#include "core/variant/variant.h" #ifdef SOWRAP_ENABLED #include "dbus-so_wrap.h" @@ -42,8 +43,6 @@ #include <dbus/dbus.h> #endif -#include "core/variant/variant.h" - #define BUS_OBJECT_NAME "org.freedesktop.portal.Desktop" #define BUS_OBJECT_PATH "/org/freedesktop/portal/desktop" diff --git a/platform/linuxbsd/godot_linuxbsd.cpp b/platform/linuxbsd/godot_linuxbsd.cpp index 76d579dd53..d059d60b72 100644 --- a/platform/linuxbsd/godot_linuxbsd.cpp +++ b/platform/linuxbsd/godot_linuxbsd.cpp @@ -28,6 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#include "os_linuxbsd.h" + +#include "main/main.h" + #include <limits.h> #include <locale.h> #include <stdlib.h> @@ -37,9 +41,6 @@ #include <sys/resource.h> #endif -#include "main/main.h" -#include "os_linuxbsd.h" - int main(int argc, char *argv[]) { #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. diff --git a/platform/linuxbsd/joypad_linux.h b/platform/linuxbsd/joypad_linux.h index 6661abdb37..26a9908d4e 100644 --- a/platform/linuxbsd/joypad_linux.h +++ b/platform/linuxbsd/joypad_linux.h @@ -32,6 +32,7 @@ #define JOYPAD_LINUX_H #ifdef JOYDEV_ENABLED + #include "core/input/input.h" #include "core/os/mutex.h" #include "core/os/thread.h" diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp index b843becfe0..ebdbd061d1 100644 --- a/platform/linuxbsd/os_linuxbsd.cpp +++ b/platform/linuxbsd/os_linuxbsd.cpp @@ -35,17 +35,13 @@ #include "main/main.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 #include "x11/display_server_x11.h" #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 #include <dlfcn.h> @@ -57,6 +53,10 @@ #include <sys/utsname.h> #include <unistd.h> +#ifdef HAVE_MNTENT +#include <mntent.h> +#endif + void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) { const char *message_programs[] = { "zenity", "kdialog", "Xdialog", "xmessage" }; diff --git a/platform/linuxbsd/os_linuxbsd.h b/platform/linuxbsd/os_linuxbsd.h index c1e735b0d4..007b90b82b 100644 --- a/platform/linuxbsd/os_linuxbsd.h +++ b/platform/linuxbsd/os_linuxbsd.h @@ -31,13 +31,14 @@ #ifndef OS_LINUXBSD_H #define OS_LINUXBSD_H -#include "core/input/input.h" #include "crash_handler_linuxbsd.h" +#include "joypad_linux.h" + +#include "core/input/input.h" #include "drivers/alsa/audio_driver_alsa.h" #include "drivers/alsamidi/midi_driver_alsamidi.h" #include "drivers/pulseaudio/audio_driver_pulseaudio.h" #include "drivers/unix/os_unix.h" -#include "joypad_linux.h" #include "servers/audio_server.h" #ifdef FONTCONFIG_ENABLED diff --git a/platform/linuxbsd/x11/detect_prime_x11.cpp b/platform/linuxbsd/x11/detect_prime_x11.cpp index 78778a8b56..2b5776ce54 100644 --- a/platform/linuxbsd/x11/detect_prime_x11.cpp +++ b/platform/linuxbsd/x11/detect_prime_x11.cpp @@ -28,29 +28,26 @@ /* 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 "core/string/print_string.h" #include "core/string/ustring.h" -#include <stdlib.h> - #include "thirdparty/glad/glad/gl.h" #include "thirdparty/glad/glad/glx.h" #ifdef SOWRAP_ENABLED -#include "dynwrappers/xlib-so_wrap.h" +#include "x11/dynwrappers/xlib-so_wrap.h" #else #include <X11/XKBlib.h> #include <X11/Xlib.h> #include <X11/Xutil.h> #endif -#include <cstring> - +#include <stdlib.h> +#include <string.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> @@ -265,5 +262,4 @@ int detect_prime() { return preferred; } -#endif -#endif +#endif // X11_ENABLED && GLES3_ENABLED diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index fa35340ebb..83b6fb7628 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -32,12 +32,13 @@ #ifdef X11_ENABLED +#include "x11/detect_prime_x11.h" +#include "x11/key_mapping_x11.h" + #include "core/config/project_settings.h" #include "core/math/math_funcs.h" #include "core/string/print_string.h" #include "core/string/ustring.h" -#include "detect_prime_x11.h" -#include "key_mapping_x11.h" #include "main/main.h" #include "scene/resources/texture.h" @@ -58,6 +59,9 @@ #include <sys/types.h> #include <unistd.h> +#undef CursorShape +#include <X11/XKBlib.h> + // ICCCM #define WM_NormalState 1L // window normal state #define WM_IconicState 3L // window minimized @@ -65,9 +69,6 @@ #define _NET_WM_STATE_REMOVE 0L // remove/unset property #define _NET_WM_STATE_ADD 1L // add/set property -#undef CursorShape -#include <X11/XKBlib.h> - // 2.2 is the first release with multitouch #define XINPUT_CLIENT_VERSION_MAJOR 2 #define XINPUT_CLIENT_VERSION_MINOR 2 @@ -869,7 +870,7 @@ int default_window_error_handler(Display *display, XErrorEvent *error) { "\n Major opcode of failed request: %d" "\n Serial number of failed request: %d" "\n Current serial number in output stream: %d", - String::utf8(message), error->request_code, error->minor_code, error->serial)); + String::utf8(message), (uint64_t)error->request_code, (uint64_t)error->minor_code, (uint64_t)error->serial)); return 0; } diff --git a/platform/linuxbsd/x11/display_server_x11.h b/platform/linuxbsd/x11/display_server_x11.h index fd3a5dccfa..176a1ffb9a 100644 --- a/platform/linuxbsd/x11/display_server_x11.h +++ b/platform/linuxbsd/x11/display_server_x11.h @@ -33,7 +33,7 @@ #ifdef X11_ENABLED -#include "servers/display_server.h" +#include "joypad_linux.h" #include "core/input/input.h" #include "core/os/mutex.h" @@ -43,27 +43,28 @@ #include "drivers/alsamidi/midi_driver_alsamidi.h" #include "drivers/pulseaudio/audio_driver_pulseaudio.h" #include "drivers/unix/os_unix.h" -#include "joypad_linux.h" #include "servers/audio_server.h" +#include "servers/display_server.h" #include "servers/rendering/renderer_compositor.h" #include "servers/rendering_server.h" #if defined(SPEECHD_ENABLED) -#include "../tts_linux.h" +#include "tts_linux.h" #endif #if defined(GLES3_ENABLED) -#include "gl_manager_x11.h" +#include "x11/gl_manager_x11.h" #endif #if defined(VULKAN_ENABLED) +#include "x11/vulkan_context_x11.h" + #include "drivers/vulkan/rendering_device_vulkan.h" -#include "vulkan_context_x11.h" #endif #if defined(DBUS_ENABLED) -#include "../freedesktop_portal_desktop.h" -#include "../freedesktop_screensaver.h" +#include "freedesktop_portal_desktop.h" +#include "freedesktop_screensaver.h" #endif #include <X11/Xatom.h> @@ -72,16 +73,16 @@ #include <X11/keysym.h> #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 #include <X11/XKBlib.h> #include <X11/Xlib.h> @@ -521,6 +522,6 @@ public: ~DisplayServerX11(); }; -#endif // X11 enabled +#endif // X11_ENABLED #endif // DISPLAY_SERVER_X11_H diff --git a/platform/linuxbsd/x11/gl_manager_x11.cpp b/platform/linuxbsd/x11/gl_manager_x11.cpp index 1e579c9f01..f24bac5e19 100644 --- a/platform/linuxbsd/x11/gl_manager_x11.cpp +++ b/platform/linuxbsd/x11/gl_manager_x11.cpp @@ -30,15 +30,14 @@ #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 <stdlib.h> #include <unistd.h> -#include "thirdparty/glad/glad/glx.h" - #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 @@ -403,5 +402,4 @@ GLManager_X11::~GLManager_X11() { release_current(); } -#endif -#endif +#endif // X11_ENABLED && GLES3_ENABLED diff --git a/platform/linuxbsd/x11/gl_manager_x11.h b/platform/linuxbsd/x11/gl_manager_x11.h index 0203dff679..59e20fec45 100644 --- a/platform/linuxbsd/x11/gl_manager_x11.h +++ b/platform/linuxbsd/x11/gl_manager_x11.h @@ -31,12 +31,11 @@ #ifndef 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/templates/local_vector.h" +#include "servers/display_server.h" #ifdef SOWRAP_ENABLED #include "dynwrappers/xlib-so_wrap.h" @@ -53,8 +52,6 @@ #include <X11/extensions/shape.h> #endif -#include "servers/display_server.h" - struct GLManager_X11_Private; class GLManager_X11 { @@ -136,7 +133,6 @@ public: ~GLManager_X11(); }; -#endif // GLES3_ENABLED -#endif // X11_ENABLED +#endif // X11_ENABLED && GLES3_ENABLED #endif // GL_MANAGER_X11_H diff --git a/platform/linuxbsd/x11/key_mapping_x11.h b/platform/linuxbsd/x11/key_mapping_x11.h index 48beefff4c..ae8fd67f27 100644 --- a/platform/linuxbsd/x11/key_mapping_x11.h +++ b/platform/linuxbsd/x11/key_mapping_x11.h @@ -31,16 +31,17 @@ #ifndef 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/Xlib.h> + #define XK_MISCELLANY #define XK_LATIN1 #define XK_XKB_KEYS #include <X11/keysymdef.h> -#include "core/os/keyboard.h" -#include "core/templates/hash_map.h" - class KeyMappingX11 { struct HashMapHasherKeys { static _FORCE_INLINE_ uint32_t hash(const Key p_key) { return hash_fmix32(static_cast<uint32_t>(p_key)); } diff --git a/platform/linuxbsd/x11/vulkan_context_x11.h b/platform/linuxbsd/x11/vulkan_context_x11.h index d093bca853..294fdc710e 100644 --- a/platform/linuxbsd/x11/vulkan_context_x11.h +++ b/platform/linuxbsd/x11/vulkan_context_x11.h @@ -34,6 +34,7 @@ #ifdef VULKAN_ENABLED #include "drivers/vulkan/vulkan_context.h" + #include <X11/Xlib.h> class VulkanContextX11 : public VulkanContext { |