diff --git a/src/menu.cpp b/src/menu.cpp index 7a0d2d9b9..88f5a3986 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -649,7 +649,6 @@ short GraphicsDlg(stCloneKeenPlus *pCKP) unsigned short zoom = 1; unsigned short filter = 0; unsigned short frameskip = 0; - bool opengl = false; unsigned char gl_filter = 0; bool fsmode; char buf[256]; @@ -689,7 +688,7 @@ short GraphicsDlg(stCloneKeenPlus *pCKP) fsmode = false; } - opengl = g_pVideoDriver->isOpenGL(); + bool opengl = g_pVideoDriver->isOpenGL(); if(!opengl) { zoom = g_pVideoDriver->getZoomValue(); @@ -844,7 +843,7 @@ short GraphicsDlg(stCloneKeenPlus *pCKP) } else if(selection == 5) { - opengl = opengl ? false : true; // switch the mode!! + opengl = !opengl; // switch the mode!! if(opengl) DisplayMenu->setOptionText(5,"OpenGL Acceleration"); diff --git a/src/sdl/COpenGL.h b/src/sdl/COpenGL.h index 4b68035cf..5d9ccea88 100644 --- a/src/sdl/COpenGL.h +++ b/src/sdl/COpenGL.h @@ -9,6 +9,9 @@ * */ +#ifndef __CG_COPENGL_H__ +#define __CG_COPENGL_H__ + #include #include #include "../scale2x/scalebit.h" @@ -32,3 +35,4 @@ private: unsigned int m_texparam; }; +#endif