mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
Fix StretchBlt ugliness in qemu. Patch by grschneider.
svn path=/trunk/; revision=35699
This commit is contained in:
parent
57164f6854
commit
0346f58af5
1 changed files with 5 additions and 14 deletions
|
@ -466,18 +466,6 @@ typedef unsigned short PIXEL;
|
|||
/* 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 @@ __inline PIXEL average16(PIXEL a, PIXEL b)
|
|||
|
||||
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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue