Ticket #8451: mouse.dif

File mouse.dif, 1.1 KB (added by SF/ewelsh42, 15 years ago)

diff to fix mouse dirty rects too big problem

Line 
1*** graphics.cpp.old Sat Jul 30 16:10:56 2005
2--- graphics.cpp Sun Aug 14 04:55:46 2005
3***************
4*** 1523,1528 ****
5--- 1523,1551 ----
6 src.w = dst.w;
7 src.h = dst.h;
8
9+ // recalculate dst.w and dst.h
10+ //
11+ // FIXME: Is this the "correct" way to solve the oversized dirty rects
12+ // problem?
13+ //
14+ // At this point, dst.w and dst.h appear to be the correct values to
15+ // assign to src.w and src.h above, but they are NOT the actual
16+ // width and heigh of the mouse in virtual coordinates required for
17+ // the dirty rects. If left uncorrected, the w and h values are 1.5x
18+ // too large for 3x scalers when the overlay is visible, and 2x/3x too
19+ // large for 2x/3x scalers when the overlay is not visible, resulting
20+ // in dirty rects that are from 2.25x to 9x too large depending on the
21+ // combination of scales.
22+ //
23+ if (!_overlayVisible) {
24+ dst.w = _mouseCurState.w;
25+ dst.h = _mouseCurState.h;
26+ }
27+ else {
28+ dst.w = _mouseCurState.w * _overlayScale;
29+ dst.h = _mouseCurState.h * _overlayScale;
30+ }
31+
32 if (_adjustAspectRatio)
33 dst.y = real2Aspect(dst.y);
34