Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Nathan J Williams <nathanw@netbsd.org>
List: source-changes
Date: 02/12/2001 06:33:38
Module Name:	syssrc
Committed By:	nathanw
Date:		Mon Feb 12 04:33:38 UTC 2001

Modified Files:
	syssrc/sys/dev/rasops: rasops.c

Log Message:
Correct the ri_xorigin calculation for the RI_CENTER case again.

Original calculation (bits += (ri_stride - ri_emustride) / 2) was
incorrect because stride may be wider than visible width.

Fix in 1.33 (bits += (ri_width - ri_emustride) / 2) was incorrect
because units do not match; "bits" and "ri_emustride" are in bytes,
but "width" is in pels. Works by accident for 8bpp displays.

Change to bits += ((ri_width * bpp / 8) - ri_emustride) / 2
to correctly account for visible width and bpp.


To generate a diff of this commit:
cvs rdiff -r1.35 -r1.36 syssrc/sys/dev/rasops/rasops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.