Fix compilation without SDL
This commit is contained in:
@@ -372,7 +372,7 @@ public:
|
||||
/// <summary>
|
||||
/// Returns the display server name on Linux.
|
||||
/// </summary>
|
||||
API_PROPERTY() static String GetDisplayServer() = delete;
|
||||
API_PROPERTY() static String GetDisplayServer();
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if is running 64 bit application (otherwise 32 bit). It's compile-time constant.
|
||||
|
||||
@@ -12,11 +12,14 @@
|
||||
#include "Engine/Platform/Linux/LinuxPlatform.h"
|
||||
#include "Engine/Platform/Linux/IncludeX11.h"
|
||||
|
||||
#if PLATFORM_SDL
|
||||
#include <libportal/portal-enums.h>
|
||||
#include <libportal/screenshot.h>
|
||||
#endif
|
||||
|
||||
Delegate<Color32> ScreenUtilitiesBase::PickColorDone;
|
||||
|
||||
#if PLATFORM_SDL
|
||||
namespace PortalImpl
|
||||
{
|
||||
XdpPortal* Portal = nullptr;
|
||||
@@ -25,6 +28,7 @@ namespace PortalImpl
|
||||
gpointer GLibMainLoop(gpointer data);
|
||||
void PickColorCallback(GObject* source, GAsyncResult* result, gpointer data);
|
||||
}
|
||||
#endif
|
||||
|
||||
Color32 LinuxScreenUtilities::GetColorAt(const Float2& pos)
|
||||
{
|
||||
@@ -93,7 +97,7 @@ void LinuxScreenUtilities::PickColor()
|
||||
LinuxPlatform::xEventReceived.Bind(OnScreenUtilsXEventCallback);
|
||||
return;
|
||||
}
|
||||
|
||||
#if PLATFORM_SDL
|
||||
if (PortalImpl::MainLoopReady == 0)
|
||||
{
|
||||
// Initialize portal
|
||||
@@ -117,8 +121,10 @@ void LinuxScreenUtilities::PickColor()
|
||||
// Enter color picking mode, the callback receives the final color
|
||||
xdp_portal_pick_color(PortalImpl::Portal, nullptr, nullptr, PortalImpl::PickColorCallback, nullptr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if PLATFORM_SDL
|
||||
gpointer PortalImpl::GLibMainLoop(gpointer data)
|
||||
{
|
||||
GMainContext* mainContext = g_main_context_get_thread_default();
|
||||
@@ -154,5 +160,6 @@ void PortalImpl::PickColorCallback(GObject* source, GAsyncResult* result, gpoint
|
||||
|
||||
ScreenUtilities::PickColorDone(color);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -89,6 +89,7 @@ public:
|
||||
void Focus() override;
|
||||
void SetTitle(const StringView& title) override;
|
||||
DragDropEffect DoDragDrop(const StringView& data) override;
|
||||
using WindowBase::DoDragDrop;
|
||||
void StartTrackingMouse(bool useMouseScreenOffset) override;
|
||||
void EndTrackingMouse() override;
|
||||
void SetCursor(CursorType type) override;
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
void Focus() override;
|
||||
void SetTitle(const StringView& title) override;
|
||||
DragDropEffect DoDragDrop(const StringView& data) override;
|
||||
using WindowBase::DoDragDrop;
|
||||
void StartTrackingMouse(bool useMouseScreenOffset) override;
|
||||
void EndTrackingMouse() override;
|
||||
void SetCursor(CursorType type) override;
|
||||
|
||||
@@ -183,6 +183,7 @@ public:
|
||||
void Focus() override;
|
||||
void SetTitle(const StringView& title) override;
|
||||
DragDropEffect DoDragDrop(const StringView& data) override;
|
||||
using WindowBase::DoDragDrop;
|
||||
void StartTrackingMouse(bool useMouseScreenOffset) override;
|
||||
void EndTrackingMouse() override;
|
||||
void SetCursor(CursorType type) override;
|
||||
|
||||
@@ -123,6 +123,7 @@ public:
|
||||
void Focus() override;
|
||||
void SetTitle(const StringView& title) override;
|
||||
DragDropEffect DoDragDrop(const StringView& data) override;
|
||||
using WindowBase::DoDragDrop;
|
||||
void StartTrackingMouse(bool useMouseScreenOffset) override;
|
||||
void EndTrackingMouse() override;
|
||||
void StartClippingCursor(const Rectangle& bounds) override;
|
||||
|
||||
Reference in New Issue
Block a user