fix compilation with SDL only
This commit is contained in:
parent
e61f85de6f
commit
cca234f955
4 changed files with 8 additions and 2 deletions
src
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
//@}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue