From 3ccc50f35a1c664a2fd121a2a2896bdffa677bd1 Mon Sep 17 00:00:00 2001 From: albertzeyer Date: Wed, 22 Jul 2009 23:59:20 +0000 Subject: [PATCH] small opengl cleanup / fixes git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@115 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/menu.cpp | 5 ++--- src/sdl/COpenGL.h | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) 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