fixed a truncate error with casting between floats and ints: this makes the centering calculation for WS panels work more precise, removing some 'noise' pixels on the right side of the screen when displaying non native aspect modes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11235 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -399,7 +399,7 @@ status_t nv_crtc_set_timing(display_mode target)
|
||||
DACW(FP_DEBUG1, (((iscale_x >> 1) & 0x00000fff) | (1 << 12)));
|
||||
/* center/cut-off left and right side of screen */
|
||||
diff = ((si->ps.p1_timing.h_display -
|
||||
(target.timing.h_display * ((1 << 12) / ((float)iscale_x))))
|
||||
((target.timing.h_display * (1 << 12)) / iscale_x))
|
||||
/ 2);
|
||||
DACW(FP_HVALID_S, diff);
|
||||
DACW(FP_HVALID_E, ((si->ps.p1_timing.h_display - diff) - 1));
|
||||
|
||||
@@ -382,7 +382,7 @@ status_t nv_crtc2_set_timing(display_mode target)
|
||||
DAC2W(FP_DEBUG1, (((iscale_x >> 1) & 0x00000fff) | (1 << 12)));
|
||||
/* center/cut-off left and right side of screen */
|
||||
diff = ((si->ps.p2_timing.h_display -
|
||||
(target.timing.h_display * ((1 << 12) / ((float)iscale_x))))
|
||||
((target.timing.h_display * (1 << 12)) / iscale_x))
|
||||
/ 2);
|
||||
DAC2W(FP_HVALID_S, diff);
|
||||
DAC2W(FP_HVALID_E, ((si->ps.p2_timing.h_display - diff) - 1));
|
||||
|
||||
Reference in New Issue
Block a user