[Scummvm-cvs-logs] SF.net SVN: scummvm:[51604] scummvm/branches/gsoc2010-opengl/backends/ graphics/opengl
vgvgf at users.sourceforge.net
vgvgf at users.sourceforge.net
Mon Aug 2 05:17:13 CEST 2010
Revision: 51604
http://scummvm.svn.sourceforge.net/scummvm/?rev=51604&view=rev
Author: vgvgf
Date: 2010-08-02 03:17:12 +0000 (Mon, 02 Aug 2010)
Log Message:
-----------
OPENGL: Save last fullscreen mode size to config file.
Modified Paths:
--------------
scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp
scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp
Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp 2010-08-02 03:03:28 UTC (rev 51603)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp 2010-08-02 03:17:12 UTC (rev 51604)
@@ -27,6 +27,7 @@
#include "backends/graphics/opengl/opengl-graphics.h"
#include "backends/graphics/opengl/glerrorcheck.h"
+#include "common/config-manager.h"
#include "common/file.h"
#include "common/mutex.h"
#include "common/translation.h"
@@ -55,7 +56,7 @@
_videoMode.mode = OpenGL::GFX_DOUBLESIZE;
_videoMode.scaleFactor = 2;
- _videoMode.fullscreen = false;
+ _videoMode.fullscreen = ConfMan.getBool("fullscreen");
_videoMode.antialiasing = false;
_videoMode.aspectRatioCorrection = 0;
Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp 2010-08-02 03:03:28 UTC (rev 51603)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp 2010-08-02 03:17:12 UTC (rev 51604)
@@ -47,7 +47,12 @@
// Get desktop resolution
const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo();
if (videoInfo->current_w > 0 && videoInfo->current_h > 0)
- _desktopAspectRatio = videoInfo->current_w * 10000 / videoInfo->current_h;
+ _desktopAspectRatio = videoInfo->current_w * 10000 / videoInfo->current_h;
+
+ if (ConfMan.hasKey("last_fullscreen_mode_width") && ConfMan.hasKey("last_fullscreen_mode_height")) {
+ _lastFullscreenModeWidth = ConfMan.getInt("last_fullscreen_mode_width");
+ _lastFullscreenModeHeight = ConfMan.getInt("last_fullscreen_mode_height");
+ }
}
OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager() {
@@ -360,6 +365,8 @@
if (_videoMode.fullscreen) {
_lastFullscreenModeWidth = _videoMode.hardwareWidth;
_lastFullscreenModeHeight = _videoMode.hardwareHeight;
+ ConfMan.setInt("last_fullscreen_mode_width", _lastFullscreenModeWidth);
+ ConfMan.setInt("last_fullscreen_mode_height", _lastFullscreenModeHeight);
}
// Call and return parent implementation of this method
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list