Fix compilation in Linux

This commit is contained in:
2024-07-26 19:09:05 +03:00
parent b3e964e032
commit 899acb4eee
3 changed files with 8 additions and 4 deletions

View File

@@ -4,11 +4,12 @@
#include "SDLInput.h"
#include "SDLWindow.h"
#include "Engine/Core/Collections/Dictionary.h"
#include "Engine/Core/Log.h"
#include "Engine/Input/Input.h"
#include "Engine/Input/Mouse.h"
#include "Engine/Input/Keyboard.h"
#include "Engine/Input/Gamepad.h"
#include "Engine/Core/Collections/Dictionary.h"
#include <SDL3/SDL_events.h>

View File

@@ -226,9 +226,9 @@ void* GetNativeWindowPointer(SDL_Window* window)
#if PLATFORM_WINDOWS
windowPtr = SDL_GetPointerProperty(props, SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr);
#elif PLATFORM_LINUX
windowPtr = GetWaylandSurfacePtr();
windowPtr = SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, nullptr);
if (windowPtr == nullptr)
windowPtr = (void*)GetX11WindowHandle();
windowPtr = (void*)SDL_GetNumberProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
#elif PLATFORM_MAC
windowPtr = SDL_GetPointerProperty(props, SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr);
#elif PLATFORM_ANDROID

View File

@@ -8,6 +8,9 @@
struct SDL_Window;
union SDL_Event;
#if PLATFORM_LINUX
class MessageBox;
#endif
/// <summary>
/// Implementation of the window class for SDL platform
@@ -20,7 +23,7 @@ class FLAXENGINE_API SDLWindow : public WindowBase
friend SDLPlatform;
#if PLATFORM_LINUX
friend LinuxPlatform;
friend class LinuxWindow;
friend MessageBox;
#endif
private: