Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/rasops Fix an error in xoffset calculation. Reveale...



details:   https://anonhg.NetBSD.org/src/rev/ebf1ebfeae02
branches:  trunk
changeset: 500837:ebf1ebfeae02
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Tue Dec 19 09:52:53 2000 +0000

description:
Fix an error in xoffset calculation.  Revealed in the case when
ri_width is less than ri_stride and screen is layouted RI_CENTERed.

diffstat:

 sys/dev/rasops/rasops.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b07577ee1fbc -r ebf1ebfeae02 sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Tue Dec 19 09:37:04 2000 +0000
+++ b/sys/dev/rasops/rasops.c   Tue Dec 19 09:52:53 2000 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.32 2000/06/13 13:36:53 ad Exp $  */
+/*      $NetBSD: rasops.c,v 1.33 2000/12/19 09:52:53 nisimura Exp $    */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.32 2000/06/13 13:36:53 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.33 2000/12/19 09:52:53 nisimura Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -234,7 +234,7 @@
        ri->ri_origbits = ri->ri_bits;
 
        if ((ri->ri_flg & RI_CENTER) != 0) {
-               ri->ri_bits += ((ri->ri_stride - ri->ri_emustride) >> 1) & ~3;
+               ri->ri_bits += ((ri->ri_width - ri->ri_emustride) >> 1) & ~3;
                ri->ri_bits += ((ri->ri_height - ri->ri_emuheight) >> 1) *
                    ri->ri_stride;
 



Home | Main Index | Thread Index | Old Index