diff --git a/dlls/krnl386.exe16/int10.c b/dlls/krnl386.exe16/int10.c index dfba761d431..2ac9703b2cc 100644 --- a/dlls/krnl386.exe16/int10.c +++ b/dlls/krnl386.exe16/int10.c @@ -750,7 +750,7 @@ static BOOL INT10_SetVideoMode( BIOSDATA *data, WORD mode ) ptr->Width, ptr->Height, ptr->Depth, clearScreen ? "cleared" : "preserved" ); - if ( VGA_SetMode(mode) ) + if (!VGA_SetMode(mode)) return FALSE; } diff --git a/dlls/krnl386.exe16/int33.c b/dlls/krnl386.exe16/int33.c index 7226816a014..0f03ac7aa06 100644 --- a/dlls/krnl386.exe16/int33.c +++ b/dlls/krnl386.exe16/int33.c @@ -295,7 +295,7 @@ void DOSVM_Int33Message(UINT message,WPARAM wParam,LPARAM lParam) WORD mask = 0; unsigned Height, Width, SX=1, SY=1; - if (!VGA_GetMode(&Height,&Width,NULL)) { + if (VGA_GetMode(&Height, &Width, NULL)) { /* may need to do some coordinate scaling */ if (Width) SX = 640/Width; diff --git a/dlls/krnl386.exe16/vga.c b/dlls/krnl386.exe16/vga.c index f1b632e24e4..ade19f7c691 100644 --- a/dlls/krnl386.exe16/vga.c +++ b/dlls/krnl386.exe16/vga.c @@ -735,7 +735,7 @@ static char*VGA_AlphaBuffer(void) typedef struct { unsigned Xres, Yres, Depth; - int ret; + BOOL ret; } ModeSet; @@ -780,7 +780,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg) { HRESULT res; ModeSet *par = (ModeSet *)arg; - par->ret=1; + par->ret = FALSE; if (lpddraw) VGA_DoExit(0); if (!lpddraw) { @@ -845,7 +845,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg) /* poll every 20ms (50fps should provide adequate responsiveness) */ VGA_InstallTimer(20); } - par->ret=0; + par->ret = TRUE; return; } @@ -872,7 +872,7 @@ const VGA_MODE *VGA_GetModeInfo(WORD mode) return NULL; } -static int VGA_SetGraphicMode(WORD mode) +static BOOL VGA_SetGraphicMode(WORD mode) { ModeSet par; int newSize; @@ -954,7 +954,7 @@ static int VGA_SetGraphicMode(WORD mode) return par.ret; } -int VGA_SetMode(WORD mode) +BOOL VGA_SetMode(WORD mode) { const VGA_MODE *ModeInfo; /* get info on VGA mode & set appropriately */ @@ -980,17 +980,17 @@ int VGA_SetMode(WORD mode) { return VGA_SetGraphicMode(mode); } - return 0; /* assume all good & return zero */ + return TRUE; /* assume all good & return TRUE */ } -int VGA_GetMode(unsigned*Height,unsigned*Width,unsigned*Depth) +BOOL VGA_GetMode(unsigned *Height, unsigned *Width, unsigned *Depth) { - if (!lpddraw) return 1; - if (!lpddsurf) return 1; + if (!lpddraw) return FALSE; + if (!lpddsurf) return FALSE; if (Height) *Height=sdesc.dwHeight; if (Width) *Width=sdesc.dwWidth; if (Depth) *Depth=sdesc.ddpfPixelFormat.u1.dwRGBBitCount; - return 0; + return TRUE; } static void VGA_Exit(void) diff --git a/dlls/krnl386.exe16/vga.h b/dlls/krnl386.exe16/vga.h index 5d79567c1d7..b4976f6e71b 100644 --- a/dlls/krnl386.exe16/vga.h +++ b/dlls/krnl386.exe16/vga.h @@ -52,10 +52,10 @@ extern const VGA_MODE VGA_modelist[]; /* all vga modes */ const VGA_MODE *VGA_GetModeInfo(WORD mode); -int VGA_SetMode(WORD mode); +BOOL VGA_SetMode(WORD mode); /* graphics mode */ -int VGA_GetMode(unsigned*Height,unsigned*Width,unsigned*Depth); +BOOL VGA_GetMode(unsigned *Height, unsigned *Width, unsigned *Depth); void VGA_SetPalette(PALETTEENTRY*pal,int start,int len); void VGA_SetColor16(int reg,int color); char VGA_GetColor16(int reg);