[Scummvm-cvs-logs] scummvm master -> 5ffecd85b332a73ef803b5755f80b6180883153e

lordhoto lordhoto at gmail.com
Tue Mar 1 05:47:51 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5ffecd85b3 OPENGL: Limit maximum cursor scale.


Commit: 5ffecd85b332a73ef803b5755f80b6180883153e
    https://github.com/scummvm/scummvm/commit/5ffecd85b332a73ef803b5755f80b6180883153e
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-02-28T20:45:56-08:00

Commit Message:
OPENGL: Limit maximum cursor scale.

This avoids too big cursors when the screen resolution is really high.

Changed paths:
    backends/graphics/opengl/opengl-graphics.cpp



diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 50aabc6..522c36e 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -845,7 +845,8 @@ void OpenGLGraphicsManager::refreshCursorScale() {
 	} else {
 		// Otherwise, scale the cursor for the overlay
 		int targetScaleFactor = MIN(_cursorTargetScale, _videoMode.scaleFactor);
-		int actualFactor = screenScaleFactor - (targetScaleFactor - 1) * 10000;
+		// We limit the maximum scale to 3 here to avoid too big cursors, for large overlay resolutions
+		int actualFactor = MIN<uint>(3, screenScaleFactor - (targetScaleFactor - 1)) * 10000;
 		_cursorState.rW = (int16)(_cursorState.w * actualFactor / 10000);
 		_cursorState.rH = (int16)(_cursorState.h * actualFactor / 10000);
 		_cursorState.rHotX = (int16)(_cursorState.hotX * actualFactor / 10000);






More information about the Scummvm-git-logs mailing list