[ scummvm-Bugs-1258939 ] GUI: SDL mouse dirty rects too big

SourceForge.net noreply at sourceforge.net
Sun Aug 14 13:34:13 CEST 2005


Bugs item #1258939, was opened at 2005-08-14 06:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1258939&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GUI
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Eric A. Welsh (ewelsh42)
Assigned to: Nobody/Anonymous (nobody)
Summary: GUI: SDL mouse dirty rects too big

Initial Comment:
In the current CVS version of
backends/sdl/graphics.cpp, the mouse dirty rects are
too big.  The effect is most easily observed in
relation to bug #1185275 (mouse over distorts what's
underneath left by one pixel in 3x overlay).  Move the
mouse from the left toward a vertical line on the right
(say, the launcher menu scroll bar).  Before the mouse
rectangle gets near the vertical line, it distorts as
if the mouse were already over it.  This happens at
1.5x the "real" width of the mouse bitmap.  The same
goes for below the mouse.  If one of the scaler
functions is edited so as to highlight redrawn areas,
the dirty rects can be observed as they redraw.  With
3x scalers and visible overlay, both the width and
height of the mouse dirty rects are 1.5x too large. 
With non-visible overlays, 2x scalers are 2x too large,
and 3x scalers are 3x too large.  The problem can be
traced to drawMouse(), prior to the "_mouseBackup =
dst" line which saves the current dst.w and dst.h for
later use by undrawMouse and creating dirty rects.  At
this point, dst.w and dst.h are larger than they should
be.  A quick fix can be implemented which sets them to
the correct values.  I've attached a small patch to fix
the problem.  I'm not sure if it is the "correct" way
to fix the problem, but if not, it does work, so I
think it may be headed in the right direction.

Another way to observe the effects of the problem is to
play a game with a large mouse bounding box on a slow
CPU with a slow 3x filter.  Since the mouse is
redrawn/undrawn constantly now (as opposed to only when
it needs to be, like it was before this last major GUI
change) and the dirty rects problem results in a
refresh area 9x as large as it should be, that puts a
strain on the filter and the mouse moves quite
sluggishly if it is too much CPU load for the machine
to handle.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1258939&group_id=37116




More information about the Scummvm-tracker mailing list