From 96f9b97b61a4c1b985c9edf7746fff9c9c81a1b8 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 7 Sep 2021 15:21:25 +1000 Subject: [PATCH] Arx-Libertatis: bump to release version --- ...2~git.recipe => arx_libertatis-1.2.recipe} | 15 +- ...t.patchset => arx_libertatis-1.2.patchset} | 459 ++++++++---------- 2 files changed, 222 insertions(+), 252 deletions(-) rename games-rpg/arx_libertatis/{arx_libertatis-1.2~git.recipe => arx_libertatis-1.2.recipe} (90%) rename games-rpg/arx_libertatis/patches/{arx_libertatis-1.2~git.patchset => arx_libertatis-1.2.patchset} (83%) diff --git a/games-rpg/arx_libertatis/arx_libertatis-1.2~git.recipe b/games-rpg/arx_libertatis/arx_libertatis-1.2.recipe similarity index 90% rename from games-rpg/arx_libertatis/arx_libertatis-1.2~git.recipe rename to games-rpg/arx_libertatis/arx_libertatis-1.2.recipe index 2fd62a9fc..ec9d3236c 100644 --- a/games-rpg/arx_libertatis/arx_libertatis-1.2~git.recipe +++ b/games-rpg/arx_libertatis/arx_libertatis-1.2.recipe @@ -6,13 +6,12 @@ system where the player draws runes in real time to effect the desired spell. \ Arx Libertatis updates and improves Arx Fatalis by supporting modern systems, \ porting the game to new systems as well as eliminating bugs and limitations." HOMEPAGE="https://arx-libertatis.org/" -COPYRIGHT="2012-2019 Arx-Libertatis team" +COPYRIGHT="2012-2021 Arx-Libertatis team" LICENSE="GNU GPL v3" -REVISION="3" -srcGitRev="85d293a69d486466e0c51de3ebf92f70941dc4f0" -SOURCE_URI="https://github.com/arx/ArxLibertatis/archive/$srcGitRev.tar.gz" -CHECKSUM_SHA256="3c034f42f8df4bd3dfa8db659ce1c4b3c913ed36ad65d64156e46515d7a74b99" -SOURCE_DIR="ArxLibertatis-$srcGitRev" +REVISION="1" +SOURCE_URI="https://github.com/arx/ArxLibertatis/releases/download/$portVersion/arx-libertatis-$portVersion.tar.xz" +CHECKSUM_SHA256="bacf7768c4e21c9166c7ea57083d4f20db0deb8f0ee7d96b5f2829e73a75ad0c" +SOURCE_DIR="arx-libertatis-$portVersion" srcGitRev2="68b5907feff0dda72fe5435e1108ccd2ad7e8ed5" SOURCE_URI_2="https://github.com/EXL/BeGameLauncher/archive/$srcGitRev2.tar.gz" CHECKSUM_SHA256_2="e564291d665ad3c9bb329e6849ab399d1ce0cbc59bd47bcc15a22f3c6e9345a1" @@ -25,7 +24,7 @@ SECONDARY_ARCHITECTURES="x86" PROVIDES=" arx_libertatis$secondaryArchSuffix = $portVersion - app:ArxLibertatis$secondaryArchSuffix + app:ArxLibertatis " REQUIRES=" haiku$secondaryArchSuffix @@ -50,7 +49,7 @@ BUILD_REQUIRES=" devel:libGL$secondaryArchSuffix devel:libglew$secondaryArchSuffix devel:libopenal$secondaryArchSuffix - devel:libpng$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix devel:libSDL2_2.0$secondaryArchSuffix devel:libvorbis$secondaryArchSuffix devel:libz$secondaryArchSuffix diff --git a/games-rpg/arx_libertatis/patches/arx_libertatis-1.2~git.patchset b/games-rpg/arx_libertatis/patches/arx_libertatis-1.2.patchset similarity index 83% rename from games-rpg/arx_libertatis/patches/arx_libertatis-1.2~git.patchset rename to games-rpg/arx_libertatis/patches/arx_libertatis-1.2.patchset index 6a7764f8c..4f7a8f3c4 100644 --- a/games-rpg/arx_libertatis/patches/arx_libertatis-1.2~git.patchset +++ b/games-rpg/arx_libertatis/patches/arx_libertatis-1.2.patchset @@ -1,11 +1,11 @@ -From 401b0446378d2c3d9e40d19a02694e0fe06348f1 Mon Sep 17 00:00:00 2001 +From 23af82c2a4a458ef8d0bbbfbe8cda2305f85a3b1 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 18 Aug 2019 21:52:30 +1000 +Date: Tue, 7 Sep 2021 15:06:51 +1000 Subject: Fix build for Haiku diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 17dd3e0..54f27d8 100644 +index 2be4e6b..db67d01 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,5 +1,6 @@ @@ -27,239 +27,11 @@ index 17dd3e0..54f27d8 100644 @@ -120,6 +122,7 @@ add_icon(arx-libertatis ) - add_icon(TARGET arx-libertatis-logo arx-libertatis-logo.svg 58 512) + add_icon(TARGET arx-libertatis-logo arx-libertatis-logo.svg 58 3080x512) +endif() add_custom_target(data DEPENDS arx-libertatis-icon -diff --git a/src/core/Config.cpp b/src/core/Config.cpp -index b144890..5ab8cf4 100644 ---- a/src/core/Config.cpp -+++ b/src/core/Config.cpp -@@ -81,7 +81,11 @@ const int - quickLevelTransition = JumpToChangeLevel; - - const bool -+#if ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ fullscreen = false, -+#else - fullscreen = true, -+#endif - showCrosshair = true, - antialiasing = true, - colorkeyAntialiasing = true, -@@ -435,6 +439,10 @@ bool Config::save() { - // video - writer.beginSection(Section::Video); - writer.writeKey(Key::renderer, video.renderer); -+#if ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ writer.writeKey(Key::resolution, Default::resolution); -+ writer.writeKey(Key::fullscreen, false); -+#else - if(video.mode.resolution == Vec2i(0)) { - writer.writeKey(Key::resolution, Default::resolution); - } else { -@@ -444,6 +452,7 @@ bool Config::save() { - } - writer.writeKey(Key::refreshRate, video.mode.refresh); - writer.writeKey(Key::fullscreen, video.fullscreen); -+#endif - writer.writeKey(Key::levelOfDetail, video.levelOfDetail); - writer.writeKey(Key::fogDistance, video.fogDistance); - writer.writeKey(Key::gamma, video.gamma); -@@ -578,6 +587,10 @@ bool Config::init(const fs::path & file) { - - // Get video settings - video.renderer = reader.getKey(Section::Video, Key::renderer, Default::renderer); -+#if ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ video.mode.resolution = Vec2i(0); -+ video.fullscreen = false; -+#else - std::string resolution = reader.getKey(Section::Video, Key::resolution, Default::resolution); - if(resolution == "auto") { - video.mode.resolution = Vec2i(0); -@@ -586,6 +599,7 @@ bool Config::init(const fs::path & file) { - } - video.mode.refresh = reader.getKey(Section::Video, Key::refreshRate, Default::refreshRate); - video.fullscreen = reader.getKey(Section::Video, Key::fullscreen, Default::fullscreen); -+#endif - video.levelOfDetail = reader.getKey(Section::Video, Key::levelOfDetail, Default::levelOfDetail); - video.fogDistance = reader.getKey(Section::Video, Key::fogDistance, Default::fogDistance); - video.gamma = reader.getKey(Section::Video, Key::gamma, Default::gamma); -diff --git a/src/graphics/opengl/OpenGLRenderer.cpp b/src/graphics/opengl/OpenGLRenderer.cpp -index 5cf7b49..f892c3b 100644 ---- a/src/graphics/opengl/OpenGLRenderer.cpp -+++ b/src/graphics/opengl/OpenGLRenderer.cpp -@@ -219,7 +219,7 @@ void OpenGLRenderer::initialize() { - - void OpenGLRenderer::beforeResize(bool wasOrIsFullscreen) { - --#if ARX_PLATFORM == ARX_PLATFORM_LINUX || ARX_PLATFORM == ARX_PLATFORM_BSD -+#if ARX_PLATFORM == ARX_PLATFORM_LINUX || ARX_PLATFORM == ARX_PLATFORM_BSD || ARX_PLATFORM == ARX_PLATFORM_HAIKU - // No re-initialization needed - ARX_UNUSED(wasOrIsFullscreen); - #else -diff --git a/src/platform/OS.cpp b/src/platform/OS.cpp -index 70fe2ee..176bd4f 100644 ---- a/src/platform/OS.cpp -+++ b/src/platform/OS.cpp -@@ -211,6 +211,8 @@ std::string getOSName() { - return "macOS"; - #elif ARX_PLATFORM == ARX_PLATFORM_BSD - return "BSD"; -+ #elif ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ return "Haiku"; - #elif ARX_PLATFORM == ARX_PLATFORM_UNIX - return "UNIX"; - #else -diff --git a/src/platform/Platform.h b/src/platform/Platform.h -index b914348..efda886 100644 ---- a/src/platform/Platform.h -+++ b/src/platform/Platform.h -@@ -35,6 +35,7 @@ - #define ARX_PLATFORM_WIN32 1 - #define ARX_PLATFORM_LINUX 2 - #define ARX_PLATFORM_MACOS 3 -+#define ARX_PLATFORM_HAIKU 4 - #define ARX_PLATFORM_BSD 100 // Generic BSD system - #define ARX_PLATFORM_UNIX 101 // Generic UNIX system - -@@ -44,6 +45,8 @@ - #define ARX_PLATFORM ARX_PLATFORM_WIN32 - #elif defined(__MACH__) - #define ARX_PLATFORM ARX_PLATFORM_MACOS -+#elif defined(__HAIKU__) -+ #define ARX_PLATFORM ARX_PLATFORM_HAIKU - #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \ - || defined(__bsdi__) || defined(__DragonFly__) - #define ARX_PLATFORM ARX_PLATFORM_BSD -diff --git a/src/platform/Thread.cpp b/src/platform/Thread.cpp -index fe5484a..8fcf3f7 100644 ---- a/src/platform/Thread.cpp -+++ b/src/platform/Thread.cpp -@@ -41,6 +41,10 @@ - #include ARX_INCLUDED_CPUID_H - #endif - -+#if ARX_PLATFORM == ARX_PLATFORM_HAIKU -+#include -+#endif -+ - #include - - #include "math/Random.h" -@@ -144,6 +148,9 @@ void * Thread::entryPoint(void * param) { - #elif ARX_HAVE_PRCTL && defined(PR_SET_NAME) - // Linux - prctl(PR_SET_NAME, reinterpret_cast(thread.m_threadName.c_str()), 0, 0, 0); -+ #elif ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ // Haiku -+ rename_thread(get_pthread_thread_id(thread.m_thread), thread.m_threadName.c_str()); - #else - // This is non-fatal, but let's print a warning so future ports will be - // reminded to implement it. -diff --git a/src/window/SDL2Window.cpp b/src/window/SDL2Window.cpp -index b20ed83..be93930 100644 ---- a/src/window/SDL2Window.cpp -+++ b/src/window/SDL2Window.cpp -@@ -97,6 +97,7 @@ SDL2Window::SDL2Window() - - SDL2Window::~SDL2Window() { - -+#if ARX_PLATFORM != ARX_PLATFORM_HAIKU - delete m_input; - - if(m_renderer) { -@@ -115,6 +116,7 @@ SDL2Window::~SDL2Window() { - if(s_mainWindow) { - SDL_Quit(), s_mainWindow = NULL; - } -+#endif - - } - -@@ -192,6 +194,7 @@ bool SDL2Window::initializeFramework() { - } - #endif - -+ #if ARX_PLATFORM != ARX_PLATFORM_HAIKU - int ndisplays = SDL_GetNumVideoDisplays(); - for(int display = 0; display < ndisplays; display++) { - int modes = SDL_GetNumDisplayModes(display); -@@ -206,6 +209,7 @@ bool SDL2Window::initializeFramework() { - std::sort(m_displayModes.begin(), m_displayModes.end()); - m_displayModes.erase(std::unique(m_displayModes.begin(), m_displayModes.end()), - m_displayModes.end()); -+ #endif - - s_mainWindow = this; - -@@ -241,6 +245,9 @@ int SDL2Window::createWindowAndGLContext(const char * profile) { - Uint32 windowFlags = getSDLFlagsForMode(m_mode.resolution, m_fullscreen); - windowFlags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN; - -+#if ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ m_maxMSAALevel = 1; -+#endif - for(int msaa = m_maxMSAALevel; true; msaa--) { - bool lastTry = (msaa == 0); - -@@ -509,7 +516,7 @@ bool SDL2Window::initialize() { - } - } - } -- #elif ARX_PLATFORM != ARX_PLATFORM_MACOS -+ #elif ARX_PLATFORM != ARX_PLATFORM_MACOS && ARX_PLATFORM != ARX_PLATFORM_HAIKU - u64 nativeWindow = SDL2X11_getNativeWindowHandle(m_window); - #else - u64 nativeWindow = 0; -diff --git a/src/window/SDL2X11Util.c b/src/window/SDL2X11Util.c -index 72ab23b..21f495f 100644 ---- a/src/window/SDL2X11Util.c -+++ b/src/window/SDL2X11Util.c -@@ -26,7 +26,9 @@ - #define ARX_STATIC_ASSERT(Cond, Msg) typedef char static_assertion_ ## Msg[(Cond) ? 1 : -1] - - uint64_t SDL2X11_getNativeWindowHandle(SDL_Window * window) { -- -+#if ARX_PLATFORM == ARX_PLATFORM_HAIKU -+ return 0; -+#else - /* - * The size of the SDL_SysWMinfo structure depends on the build-time configuration of SDL. - * If Arx is built with a SDL install that was configured without Wayland, but is run on -@@ -49,4 +51,5 @@ uint64_t SDL2X11_getNativeWindowHandle(SDL_Window * window) { - } - - return info.data.info.x11.window; -+#endif - } -diff --git a/src/window/SDL2X11Util.h b/src/window/SDL2X11Util.h -index b9432e4..dee2d87 100644 ---- a/src/window/SDL2X11Util.h -+++ b/src/window/SDL2X11Util.h -@@ -27,9 +27,9 @@ - #ifdef __cplusplus - extern "C" { - #endif -- -+#if ARX_PLATFORM != ARX_PLATFORM_HAIKU - uint64_t SDL2X11_getNativeWindowHandle(SDL_Window * window); -- -+#endif - #ifdef __cplusplus - } // extern "C" - #endif --- -2.23.0 - - -From a59bc8f90f5b2baf0917b2d80c3a89e162b342ad Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Mon, 19 Aug 2019 22:55:02 +1000 -Subject: Fix crash in openal player - - diff --git a/src/audio/openal/OpenALSource.cpp b/src/audio/openal/OpenALSource.cpp index de0f8e2..879246b 100644 --- a/src/audio/openal/OpenALSource.cpp @@ -307,18 +79,62 @@ index de0f8e2..879246b 100644 AL_CHECK_ERROR("setting buffer data") m_bufferSizes[i] = size; --- -2.23.0 - - -From 975fce37e4c37130aa879f52e5b2f1ccc4318197 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Mon, 19 Aug 2019 22:55:28 +1000 -Subject: Fix crash on exit - - +diff --git a/src/core/Config.cpp b/src/core/Config.cpp +index f61ac29..848d2d8 100644 +--- a/src/core/Config.cpp ++++ b/src/core/Config.cpp +@@ -83,7 +83,11 @@ const int + quickLevelTransition = JumpToChangeLevel; + + const bool ++#if ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ fullscreen = false, ++#else + fullscreen = true, ++#endif + viewBobbing = true, + screenShake = true, + showCrosshair = true, +@@ -449,6 +453,10 @@ bool Config::save() { + // video + writer.beginSection(Section::Video); + writer.writeKey(Key::renderer, video.renderer); ++#if ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ writer.writeKey(Key::resolution, Default::resolution); ++ writer.writeKey(Key::fullscreen, false); ++#else + if(video.mode.resolution == Vec2i(0)) { + writer.writeKey(Key::resolution, Default::resolution); + } else { +@@ -458,6 +466,7 @@ bool Config::save() { + } + writer.writeKey(Key::refreshRate, int(video.mode.refresh)); + writer.writeKey(Key::fullscreen, video.fullscreen); ++#endif + writer.writeKey(Key::levelOfDetail, video.levelOfDetail); + writer.writeKey(Key::fogDistance, video.fogDistance); + writer.writeKey(Key::gamma, video.gamma); +@@ -599,6 +608,10 @@ bool Config::init(const fs::path & file) { + + // Get video settings + video.renderer = reader.getKey(Section::Video, Key::renderer, Default::renderer); ++#if ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ video.mode.resolution = Vec2i(0); ++ video.fullscreen = false; ++#else + std::string resolution = reader.getKey(Section::Video, Key::resolution, Default::resolution); + if(resolution == "auto") { + video.mode.resolution = Vec2i(0); +@@ -607,6 +620,7 @@ bool Config::init(const fs::path & file) { + } + video.mode.refresh = reader.getKey(Section::Video, Key::refreshRate, Default::refreshRate); + video.fullscreen = reader.getKey(Section::Video, Key::fullscreen, Default::fullscreen); ++#endif + video.levelOfDetail = reader.getKey(Section::Video, Key::levelOfDetail, Default::levelOfDetail); + video.fogDistance = reader.getKey(Section::Video, Key::fogDistance, Default::fogDistance); + video.gamma = reader.getKey(Section::Video, Key::gamma, Default::gamma); diff --git a/src/core/Startup.cpp b/src/core/Startup.cpp -index 7d88903..b893316 100644 +index 992da02..e0f2f07 100644 --- a/src/core/Startup.cpp +++ b/src/core/Startup.cpp @@ -175,5 +175,7 @@ int utf8_main(int argc, char ** argv) { @@ -329,6 +145,161 @@ index 7d88903..b893316 100644 + return (status == ExitFailure) ? EXIT_FAILURE : EXIT_SUCCESS; } +diff --git a/src/graphics/opengl/OpenGLRenderer.cpp b/src/graphics/opengl/OpenGLRenderer.cpp +index d362674..f2f7873 100644 +--- a/src/graphics/opengl/OpenGLRenderer.cpp ++++ b/src/graphics/opengl/OpenGLRenderer.cpp +@@ -328,7 +328,7 @@ void OpenGLRenderer::initialize() { + + void OpenGLRenderer::beforeResize(bool wasOrIsFullscreen) { + +-#if ARX_PLATFORM == ARX_PLATFORM_LINUX || ARX_PLATFORM == ARX_PLATFORM_BSD ++#if ARX_PLATFORM == ARX_PLATFORM_LINUX || ARX_PLATFORM == ARX_PLATFORM_BSD || ARX_PLATFORM == ARX_PLATFORM_HAIKU + // No re-initialization needed + ARX_UNUSED(wasOrIsFullscreen); + #else +diff --git a/src/platform/OS.cpp b/src/platform/OS.cpp +index 631da70..4ea510d 100644 +--- a/src/platform/OS.cpp ++++ b/src/platform/OS.cpp +@@ -211,6 +211,8 @@ std::string getOSName() { + return "macOS"; + #elif ARX_PLATFORM == ARX_PLATFORM_BSD + return "BSD"; ++ #elif ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ return "Haiku"; + #elif ARX_PLATFORM == ARX_PLATFORM_UNIX + return "UNIX"; + #else +diff --git a/src/platform/Platform.h b/src/platform/Platform.h +index 686e93b..8c4f4fb 100644 +--- a/src/platform/Platform.h ++++ b/src/platform/Platform.h +@@ -36,6 +36,7 @@ + #define ARX_PLATFORM_WIN32 1 + #define ARX_PLATFORM_LINUX 2 + #define ARX_PLATFORM_MACOS 3 ++#define ARX_PLATFORM_HAIKU 4 + #define ARX_PLATFORM_BSD 100 // Generic BSD system + #define ARX_PLATFORM_UNIX 101 // Generic UNIX system + +@@ -45,6 +46,8 @@ + #define ARX_PLATFORM ARX_PLATFORM_WIN32 + #elif defined(__MACH__) + #define ARX_PLATFORM ARX_PLATFORM_MACOS ++#elif defined(__HAIKU__) ++ #define ARX_PLATFORM ARX_PLATFORM_HAIKU + #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \ + || defined(__bsdi__) || defined(__DragonFly__) + #define ARX_PLATFORM ARX_PLATFORM_BSD +diff --git a/src/platform/Thread.cpp b/src/platform/Thread.cpp +index 002f7ce..f217491 100644 +--- a/src/platform/Thread.cpp ++++ b/src/platform/Thread.cpp +@@ -41,6 +41,10 @@ + #include ARX_INCLUDED_CPUID_H + #endif + ++#if ARX_PLATFORM == ARX_PLATFORM_HAIKU ++#include ++#endif ++ + #include + + #include "math/Random.h" +@@ -144,6 +148,9 @@ void * Thread::entryPoint(void * param) { + #elif ARX_HAVE_PRCTL && defined(PR_SET_NAME) + // Linux + prctl(PR_SET_NAME, reinterpret_cast(thread.m_threadName.c_str()), 0, 0, 0); ++ #elif ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ // Haiku ++ rename_thread(get_pthread_thread_id(thread.m_thread), thread.m_threadName.c_str()); + #else + // This is non-fatal, but let's print a warning so future ports will be + // reminded to implement it. +diff --git a/src/window/SDL2Window.cpp b/src/window/SDL2Window.cpp +index 64bc597..4656ae3 100644 +--- a/src/window/SDL2Window.cpp ++++ b/src/window/SDL2Window.cpp +@@ -87,6 +87,7 @@ SDL2Window::SDL2Window() + + SDL2Window::~SDL2Window() { + ++#if ARX_PLATFORM != ARX_PLATFORM_HAIKU + delete m_input; + + if(m_renderer) { +@@ -105,6 +106,7 @@ SDL2Window::~SDL2Window() { + if(s_mainWindow) { + SDL_Quit(), s_mainWindow = NULL; + } ++#endif + + } + +@@ -206,6 +208,7 @@ bool SDL2Window::initializeFramework() { + } + #endif + ++ #if ARX_PLATFORM != ARX_PLATFORM_HAIKU + int ndisplays = SDL_GetNumVideoDisplays(); + for(int display = 0; display < ndisplays; display++) { + int modes = SDL_GetNumDisplayModes(display); +@@ -220,6 +223,7 @@ bool SDL2Window::initializeFramework() { + std::sort(m_displayModes.begin(), m_displayModes.end()); + m_displayModes.erase(std::unique(m_displayModes.begin(), m_displayModes.end()), + m_displayModes.end()); ++ #endif + + s_mainWindow = this; + +@@ -255,6 +259,9 @@ int SDL2Window::createWindowAndGLContext(const char * profile) { + Uint32 windowFlags = getSDLFlagsForMode(m_mode.resolution, m_fullscreen); + windowFlags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN; + ++#if ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ m_maxMSAALevel = 1; ++#endif + for(int msaa = m_maxMSAALevel; true; msaa--) { + bool lastTry = (msaa == 0); + +diff --git a/src/window/SDL2X11Util.c b/src/window/SDL2X11Util.c +index 72ab23b..21f495f 100644 +--- a/src/window/SDL2X11Util.c ++++ b/src/window/SDL2X11Util.c +@@ -26,7 +26,9 @@ + #define ARX_STATIC_ASSERT(Cond, Msg) typedef char static_assertion_ ## Msg[(Cond) ? 1 : -1] + + uint64_t SDL2X11_getNativeWindowHandle(SDL_Window * window) { +- ++#if ARX_PLATFORM == ARX_PLATFORM_HAIKU ++ return 0; ++#else + /* + * The size of the SDL_SysWMinfo structure depends on the build-time configuration of SDL. + * If Arx is built with a SDL install that was configured without Wayland, but is run on +@@ -49,4 +51,5 @@ uint64_t SDL2X11_getNativeWindowHandle(SDL_Window * window) { + } + + return info.data.info.x11.window; ++#endif + } +diff --git a/src/window/SDL2X11Util.h b/src/window/SDL2X11Util.h +index b9432e4..dee2d87 100644 +--- a/src/window/SDL2X11Util.h ++++ b/src/window/SDL2X11Util.h +@@ -27,9 +27,9 @@ + #ifdef __cplusplus + extern "C" { + #endif +- ++#if ARX_PLATFORM != ARX_PLATFORM_HAIKU + uint64_t SDL2X11_getNativeWindowHandle(SDL_Window * window); +- ++#endif + #ifdef __cplusplus + } // extern "C" + #endif -- -2.23.0 +2.30.2