[Scummvm-git-logs] scummvm master -> 453aaa552280a5366d95fb88bec91dc3b0d0ac89

eriktorbjorn noreply at scummvm.org
Sun Nov 19 09:05:46 UTC 2023


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:
453aaa5522 SCUMM: Fix glitch in Mac picture slider


Commit: 453aaa552280a5366d95fb88bec91dc3b0d0ac89
    https://github.com/scummvm/scummvm/commit/453aaa552280a5366d95fb88bec91dc3b0d0ac89
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2023-11-19T10:04:47+01:00

Commit Message:
SCUMM: Fix glitch in Mac picture slider

When dragging the handle, even if the calculated value doesn't change we
still need to reposition the handle, or it may be left sitting between
two values. This is particularly noticeable for the music quality
slider, which only has three possible values.

Changed paths:
    engines/scumm/gfx_mac.cpp


diff --git a/engines/scumm/gfx_mac.cpp b/engines/scumm/gfx_mac.cpp
index 6f9ccee3d75..f5f734397ef 100644
--- a/engines/scumm/gfx_mac.cpp
+++ b/engines/scumm/gfx_mac.cpp
@@ -1445,11 +1445,12 @@ void MacGui::MacPictureSlider::handleMouseUp(Common::Event &event) {
 	// the exact same spot.
 	int newValue = calculateValueFromPos();
 
-	if (newValue != _value) {
-		eraseHandle();
-		setValue(newValue);
-		drawHandle();
-	}
+	// Even if the value doesn't change, we need to reposition the slider
+	// handle, or it may be left between two values. This is particularly
+	// noticeable for the music quality slider.
+	eraseHandle();
+	setValue(newValue);
+	drawHandle();
 }
 
 void MacGui::MacPictureSlider::handleMouseMove(Common::Event &event) {




More information about the Scummvm-git-logs mailing list