support compilation on Haiku

This commit is contained in:
Tim Felgentreff 2018-11-02 19:40:59 +00:00
parent 05d1cac88f
commit 837db28692
2 changed files with 8 additions and 0 deletions

View file

@ -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()

View file

@ -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: