diff engine/core/controller/engine.cpp @ 635:3094988564d5

* Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 06 Oct 2010 19:19:08 +0000
parents 356634098bd9
children 855ad500f991
line wrap: on
line diff
--- a/engine/core/controller/engine.cpp	Wed Oct 06 15:49:53 2010 +0000
+++ b/engine/core/controller/engine.cpp	Wed Oct 06 19:19:08 2010 +0000
@@ -48,6 +48,7 @@
 #include "audio/soundclippool.h"
 #include "video/renderbackend.h"
 #include "video/cursor.h"
+#include "video/devicecaps.h"
 #ifdef HAVE_OPENGL
 #include "video/opengl/renderbackendopengl.h"
 #include "gui/base/opengl/opengl_gui_graphics.h"
@@ -124,6 +125,10 @@
 		return m_settings;
 	}
 
+	DeviceCaps& Engine::getDeviceCaps() {
+		return m_devcaps;
+	}
+
 	void Engine::preInit() {
 		m_logmanager = LogManager::instance();
 
@@ -192,6 +197,9 @@
 		m_renderbackend->setColorKeyEnabled(m_settings.isColorKeyEnabled());
 		m_renderbackend->init();
 
+		FL_LOG(_log, "Querying device capabilities");
+		m_devcaps.fillDeviceCaps();
+
 		FL_LOG(_log, "Creating main screen");
 		m_renderbackend->createMainScreen(
 			m_settings.getScreenWidth(),