dlls/winedos/int10.c

Gerald Pfeifer gerald at pfeifer.com
Tue Sep 15 15:25:07 CDT 2009


On Wed, 10 Jun 2009, Gerald Pfeifer wrote:
> In dlls/winedos/int10.c we currently have the following code
> 
>   VGA_SetBright((BL_reg(context) & 0x10) && 1);
> 
> which I am not sure I understand.  Is the purpose of this to only pass
> one of 0 or 1 to VGA_SetBright?  If so, I guess I'd find "... ? 1 : 0"
> more intuitive, and it's only three characters more, or "!= 0" at least.
> 
> Thoughts?

Not really a lot of response ;-), so let me try with a patch.

Gerald


ChangeLog:
Make an expression in DOSVM_Int10Handler() more clear.

diff --git a/dlls/winedos/int10.c b/dlls/winedos/int10.c
index a0b82ed..e1ce312 100644
--- a/dlls/winedos/int10.c
+++ b/dlls/winedos/int10.c
@@ -1139,7 +1139,7 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context )
                to I/O address 0x3d9 bit 4  */
             if(data->VideoMode >= 4 && data->VideoMode <= 6)
             {
-              VGA_SetBright((BL_reg(context) & 0x10) && 1);
+              VGA_SetBright((BL_reg(context) & 0x10) != 0);
               VGA_UpdatePalette();
             }
             else FIXME("Set Background/Border Color: %d/%d\n",



More information about the wine-patches mailing list