diff engine/core/video/devicecaps.h @ 653:01acc9fc35ea

* Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen. * Updated the Color masks to follow the integer standards * Added some new SDL modes (HW Surface and double buffer) to check for in DeviceCaps. * RenderBackend now saves the actual flags used to initialize the screen.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 15 Oct 2010 18:54:34 +0000
parents 07b1cf8e92b5
children
line wrap: on
line diff
--- a/engine/core/video/devicecaps.h	Fri Oct 15 15:13:10 2010 +0000
+++ b/engine/core/video/devicecaps.h	Fri Oct 15 18:54:34 2010 +0000
@@ -81,6 +81,14 @@
 		 */
 		bool isOpenGL() const { return (m_SDLFlags & SDL_OPENGL) ? true : false; };
 
+		/** Is this screen mode an SDL only screen mode
+		 */
+		bool isSDL() const { return (!(m_SDLFlags & SDL_OPENGL)) ? true : false; };
+
+		/** Returns true if this is a SDL screen mode with the SDL hardware surface enabled
+		 */
+		bool isSDLHardwareSurface() const { return (m_SDLFlags & SDL_HWSURFACE) ? true : false; };
+
 
 		//OpenGL, windowed, hw accel
 		static const uint32_t HW_WINDOWED_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL;
@@ -88,8 +96,12 @@
 		static const uint32_t HW_FULLSCREEN_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL | SDL_FULLSCREEN;
 		//SDL, windowed
 		static const uint32_t WINDOWED_SDL = 0;
+		//SDL, windowed, HW surface and double buffer
+		static const uint32_t WINDOWED_SDL_DB_HW = SDL_HWSURFACE | SDL_DOUBLEBUF;
 		//SDL, fullscreen
 		static const uint32_t FULLSCREEN_SDL = SDL_FULLSCREEN;
+		//SDL, fullscreen, HW surface and double buffer
+		static const uint32_t FULLSCREEN_SDL_DB_HW = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF;
 
 	private:
 		uint16_t m_width;