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: diff --git a/src/video/graphic.cpp b/src/video/graphic.cpp index d0d169572..ef20ae8c6 100644 --- a/src/video/graphic.cpp +++ b/src/video/graphic.cpp @@ -1648,6 +1648,7 @@ void CFiller::Load() } } +#ifdef USE_OPENGL bool CGraphic::DeleteColorCyclingTextures() { if (!ColorCyclingTextures) return false; for (int i = 0; i < NumColorCycles; i++) { @@ -1658,5 +1659,5 @@ bool CGraphic::DeleteColorCyclingTextures() { ColorCyclingTextures = NULL; return true; } - +#endif //@} diff --git a/src/video/sdl.cpp b/src/video/sdl.cpp index 5e1983b0b..a00790824 100644 --- a/src/video/sdl.cpp +++ b/src/video/sdl.cpp @@ -639,12 +639,14 @@ void InitVideoSdl() if (TheScreen == NULL) { fprintf(stderr, "Couldn't set %dx%dx%d video mode: %s\n", Video.Width, Video.Height, Video.Depth, SDL_GetError()); +#if defined(USE_OPENGL) || defined(USE_GLES) if (UseOpenGL) { fprintf(stderr, "Re-trying video without OpenGL\n"); UseOpenGL = false; InitVideoSdl(); return; } +#endif if (Video.FullScreen) { fprintf(stderr, "Re-trying video without fullscreen mode\n"); Video.FullScreen = false; diff --git a/src/video/video.cpp b/src/video/video.cpp index 50f17f91d..d1213a63b 100644 --- a/src/video/video.cpp +++ b/src/video/video.cpp @@ -394,10 +394,12 @@ void AddColorCyclingRange(unsigned int begin, unsigned int end) void SetColorCycleAll(bool value) { +#if defined(USE_OPENGL) || defined(USE_GLES) if (UseOpenGL) { // FIXME: In OpenGL-mode, we can only cycle the tileset graphic return; } +#endif CColorCycling::GetInstance().ColorCycleAll = value; }