Commit adee328a authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

gdi32: Use BOOL type where appropriate.

parent 4da17dbf
...@@ -1362,7 +1362,7 @@ static void add_join( dibdrv_physdev *pdev, HRGN region, HRGN round_cap, const P ...@@ -1362,7 +1362,7 @@ static void add_join( dibdrv_physdev *pdev, HRGN region, HRGN round_cap, const P
return; return;
} }
static int wide_line_segment( dibdrv_physdev *pdev, HRGN total, static BOOL wide_line_segment( dibdrv_physdev *pdev, HRGN total,
const POINT *pt_1, const POINT *pt_2, int dx, int dy, const POINT *pt_1, const POINT *pt_2, int dx, int dy,
BOOL need_cap_1, BOOL need_cap_2, struct face *face_1, struct face *face_2 ) BOOL need_cap_1, BOOL need_cap_2, struct face *face_1, struct face *face_2 )
{ {
...@@ -1370,7 +1370,7 @@ static int wide_line_segment( dibdrv_physdev *pdev, HRGN total, ...@@ -1370,7 +1370,7 @@ static int wide_line_segment( dibdrv_physdev *pdev, HRGN total,
BOOL sq_cap_1 = need_cap_1 && (pdev->pen_endcap == PS_ENDCAP_SQUARE); BOOL sq_cap_1 = need_cap_1 && (pdev->pen_endcap == PS_ENDCAP_SQUARE);
BOOL sq_cap_2 = need_cap_2 && (pdev->pen_endcap == PS_ENDCAP_SQUARE); BOOL sq_cap_2 = need_cap_2 && (pdev->pen_endcap == PS_ENDCAP_SQUARE);
if (dx == 0 && dy == 0) return 0; if (dx == 0 && dy == 0) return FALSE;
if (dy == 0) if (dy == 0)
{ {
...@@ -1487,7 +1487,7 @@ static int wide_line_segment( dibdrv_physdev *pdev, HRGN total, ...@@ -1487,7 +1487,7 @@ static int wide_line_segment( dibdrv_physdev *pdev, HRGN total,
face_1->dx = face_2->dx = dx; face_1->dx = face_2->dx = dx;
face_1->dy = face_2->dy = dy; face_1->dy = face_2->dy = dy;
return 1; return TRUE;
} }
static void wide_line_segments( dibdrv_physdev *pdev, int num, const POINT *pts, BOOL close, static void wide_line_segments( dibdrv_physdev *pdev, int num, const POINT *pts, BOOL close,
......
...@@ -81,7 +81,7 @@ BOOL EMFDRV_DeleteObject( PHYSDEV dev, HGDIOBJ obj ) ...@@ -81,7 +81,7 @@ BOOL EMFDRV_DeleteObject( PHYSDEV dev, HGDIOBJ obj )
UINT index; UINT index;
BOOL ret = TRUE; BOOL ret = TRUE;
if(!(index = EMFDRV_FindObject(dev, obj))) return 0; if(!(index = EMFDRV_FindObject(dev, obj))) return FALSE;
emr.emr.iType = EMR_DELETEOBJECT; emr.emr.iType = EMR_DELETEOBJECT;
emr.emr.nSize = sizeof(emr); emr.emr.nSize = sizeof(emr);
......
...@@ -471,7 +471,7 @@ BOOL WINAPI EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc, LPARAM l ...@@ -471,7 +471,7 @@ BOOL WINAPI EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc, LPARAM l
TRACE("(%p,%p,%p,%lx)\n", hdc, hmf, lpEnumFunc, lpData); TRACE("(%p,%p,%p,%lx)\n", hdc, hmf, lpEnumFunc, lpData);
if (!mh) return 0; if (!mh) return FALSE;
/* save the current pen, brush and font */ /* save the current pen, brush and font */
hPen = GetCurrentObject(hdc, OBJ_PEN); hPen = GetCurrentObject(hdc, OBJ_PEN);
......
...@@ -112,7 +112,7 @@ BOOL WINAPI SetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd ) ...@@ -112,7 +112,7 @@ BOOL WINAPI SetPixelFormat( HDC hdc, INT fmt, const PIXELFORMATDESCRIPTOR *pfd )
{ {
if (!opengl32) opengl32 = LoadLibraryW( opengl32W ); if (!opengl32) opengl32 = LoadLibraryW( opengl32W );
if (!(wglSetPixelFormat = (void *)GetProcAddress( opengl32, "wglSetPixelFormat" ))) if (!(wglSetPixelFormat = (void *)GetProcAddress( opengl32, "wglSetPixelFormat" )))
return 0; return FALSE;
} }
return wglSetPixelFormat( hdc, fmt, pfd ); return wglSetPixelFormat( hdc, fmt, pfd );
} }
...@@ -126,7 +126,7 @@ BOOL WINAPI SwapBuffers( HDC hdc ) ...@@ -126,7 +126,7 @@ BOOL WINAPI SwapBuffers( HDC hdc )
{ {
if (!opengl32) opengl32 = LoadLibraryW( opengl32W ); if (!opengl32) opengl32 = LoadLibraryW( opengl32W );
if (!(wglSwapBuffers = (void *)GetProcAddress( opengl32, "wglSwapBuffers" ))) if (!(wglSwapBuffers = (void *)GetProcAddress( opengl32, "wglSwapBuffers" )))
return 0; return FALSE;
} }
return wglSwapBuffers( hdc ); return wglSwapBuffers( hdc );
} }
...@@ -319,13 +319,13 @@ BOOL WINAPI AnimatePalette( ...@@ -319,13 +319,13 @@ BOOL WINAPI AnimatePalette(
const PALETTEENTRY *pptr = PaletteColors; const PALETTEENTRY *pptr = PaletteColors;
palPtr = GDI_GetObjPtr( hPal, OBJ_PAL ); palPtr = GDI_GetObjPtr( hPal, OBJ_PAL );
if (!palPtr) return 0; if (!palPtr) return FALSE;
pal_entries = palPtr->count; pal_entries = palPtr->count;
if (StartIndex >= pal_entries) if (StartIndex >= pal_entries)
{ {
GDI_ReleaseObj( hPal ); GDI_ReleaseObj( hPal );
return 0; return FALSE;
} }
if (StartIndex+NumEntries > pal_entries) NumEntries = pal_entries - StartIndex; if (StartIndex+NumEntries > pal_entries) NumEntries = pal_entries - StartIndex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment