[ros-diffs] [jmorlan] 35699: Fix StretchBlt ugliness in qemu. Patch by grschneider.

jmorlan at svn.reactos.org jmorlan at svn.reactos.org
Wed Aug 27 16:47:49 CEST 2008


Author: jmorlan
Date: Wed Aug 27 09:47:49 2008
New Revision: 35699

URL: http://svn.reactos.org/svn/reactos?rev=35699&view=rev
Log:
Fix StretchBlt ugliness in qemu. Patch by grschneider.

Modified:
    trunk/reactos/subsystems/win32/win32k/dib/dib16bpp.c

Modified: trunk/reactos/subsystems/win32/win32k/dib/dib16bpp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/dib/dib16bpp.c?rev=35699&r1=35698&r2=35699&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/dib/dib16bpp.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/dib/dib16bpp.c [iso-8859-1] Wed Aug 27 09:47:49 2008
@@ -466,18 +466,6 @@
 /* 16-bit HiColor (565 format) */
 __inline PIXEL average16(PIXEL a, PIXEL b)
 {
-// This one doesn't work
-/*
-    if (a == b)
-    {
-        return a;
-    }
-    else
-    {
-        unsigned short mask = ~ (((a | b) & 0x0410) << 1);
-        return ((a & mask) + (b & mask)) >> 1;
-    }*/ /* if */
-
 // This one should be correct, but it's too long
 /*
     unsigned char r1, g1, b1, r2, g2, b2, rr, gr, br;
@@ -499,8 +487,11 @@
 
     return res;
 */
-  // This one is the short form of the correct one ;-)
-  return (((a ^ b) & 0xf7deU) >> 1) + (a & b);
+  // This one is the short form of the correct one, but does not work for QEMU (expects 555 format)
+  //return (((a ^ b) & 0xf7deU) >> 1) + (a & b);
+
+  //hack until short version works properly
+  return a;
 }
 
 //NOTE: If you change something here, please do the same in other dibXXbpp.c files!



More information about the Ros-diffs mailing list