diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 2e39baffe..5517b7439 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -730,6 +730,7 @@ static bool CommandKey(int key) KeyScrollState |= ScrollRight; break; +#if defined(USE_OPENGL) || defined(USE_GLES) case SDLK_SLASH: case SDLK_BACKSLASH: if (KeyModifiers & ModifierAlt) { @@ -740,7 +741,7 @@ static bool CommandKey(int key) } } break; - +#endif default: if (HandleCommandKey(key)) { break; diff --git a/src/video/graphic.cpp b/src/video/graphic.cpp index 4351b1144..58b1c33b1 100644 --- a/src/video/graphic.cpp +++ b/src/video/graphic.cpp @@ -1648,6 +1648,7 @@ void CFiller::Load() } } +#if defined(USE_OPENGL) || defined(USE_GLES) bool CGraphic::DeleteColorCyclingTextures() { if (!ColorCyclingTextures) return false; for (int i = 1; i < NumColorCycles; i++) { @@ -1662,5 +1663,5 @@ bool CGraphic::DeleteColorCyclingTextures() { ColorCyclingTextures = NULL; return true; } - +#endif //@} diff --git a/src/video/sdl.cpp b/src/video/sdl.cpp index 50dde600d..093fcb4d6 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; }