[Scummvm-cvs-logs] SF.net SVN: scummvm:[52057] scummvm/branches/gsoc2010-opengl/backends/ graphics/openglsdl/openglsdl-graphics.cpp
vgvgf at users.sourceforge.net
vgvgf at users.sourceforge.net
Fri Aug 13 07:26:23 CEST 2010
Revision: 52057
http://scummvm.svn.sourceforge.net/scummvm/?rev=52057&view=rev
Author: vgvgf
Date: 2010-08-13 05:26:23 +0000 (Fri, 13 Aug 2010)
Log Message:
-----------
OPENGL: Restrict window scaling if current desktop resolution is not big enough.
Modified Paths:
--------------
scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp
Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp 2010-08-13 05:16:42 UTC (rev 52056)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/openglsdl/openglsdl-graphics.cpp 2010-08-13 05:26:23 UTC (rev 52057)
@@ -433,6 +433,13 @@
int factor = _videoMode.scaleFactor;
factor += (sdlKey == SDLK_MINUS || sdlKey == SDLK_KP_MINUS) ? -1 : +1;
if (0 < factor && factor < 4) {
+ // Check if the desktop resolution has been detected
+ if (_desktopWidth > 0 && _desktopHeight > 0)
+ // If the new scale factor is too big, do not scale
+ if (_videoMode.screenWidth * factor > _desktopWidth ||
+ _videoMode.screenHeight * factor > _desktopHeight)
+ return false;
+
beginGFXTransaction();
setScale(factor);
endGFXTransaction();
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