From 837db2869277ce4a8015592d1e9f30e2edc08b7e Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Fri, 2 Nov 2018 19:40:59 +0000 Subject: [PATCH] support compilation on Haiku --- CMakeLists.txt | 6 ++++++ src/ui/interface.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb3681d78..c526599c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -845,6 +845,10 @@ if(BEOS) set(stratagus_SRCS ${stratagus_SRCS} ${beos_SRCS}) endif() +if(HAIKU) + set(stratagus_LIBS ${stratagus_LIBS} -lnetwork) +endif() + # Stratagus needs to have char by default signed # No idea how to tell this to other compilers if(CMAKE_COMPILER_IS_GNUCXX) @@ -976,6 +980,8 @@ elseif(BSD) message("Platform: BSD") elseif(BEOS) message("Platform: BEOS") +elseif(HAIKU) + message("Platform: Haiku") elseif(LINUX) message("Platform: Linux") else() diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 2e39baffe..db2b2c89a 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -732,6 +732,7 @@ static bool CommandKey(int key) case SDLK_SLASH: case SDLK_BACKSLASH: +#ifdef USE_OPENGL if (KeyModifiers & ModifierAlt) { if (GLShaderPipelineSupported) { char shadername[1024] = { '\0' }; @@ -739,6 +740,7 @@ static bool CommandKey(int key) SetMessage("%s", shadername); } } +#endif break; default: