aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl
diff options
context:
space:
mode:
authorAlejandro Marzini2010-08-02 03:17:12 +0000
committerAlejandro Marzini2010-08-02 03:17:12 +0000
commit905ec1104e60ed9bb2d6f3b5964e7b9a3307249e (patch)
tree3773fbeb29ebc018b610cc99e3a26fb99aceeeec /backends/graphics/openglsdl
parent4d8f8195b8ba718fd4c76672276c4f57fc5953c5 (diff)
downloadscummvm-rg350-905ec1104e60ed9bb2d6f3b5964e7b9a3307249e.tar.gz
scummvm-rg350-905ec1104e60ed9bb2d6f3b5964e7b9a3307249e.tar.bz2
scummvm-rg350-905ec1104e60ed9bb2d6f3b5964e7b9a3307249e.zip
OPENGL: Save last fullscreen mode size to config file.
svn-id: r51604
Diffstat (limited to 'backends/graphics/openglsdl')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index ff9132a8d1..8aeae8117f 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -47,7 +47,12 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager()
// 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 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() {
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