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

winex11.drv: Use BOOL type where appropriate.

parent 10f7f09d
...@@ -124,11 +124,11 @@ static BOOL UnlockRealIMC(HIMC hIMC) ...@@ -124,11 +124,11 @@ static BOOL UnlockRealIMC(HIMC hIMC)
static void IME_RegisterClasses(void) static void IME_RegisterClasses(void)
{ {
static int done; static BOOL done = FALSE;
WNDCLASSW wndClass; WNDCLASSW wndClass;
if (done) return; if (done) return;
done = 1; done = TRUE;
ZeroMemory(&wndClass, sizeof(WNDCLASSW)); ZeroMemory(&wndClass, sizeof(WNDCLASSW));
wndClass.style = CS_GLOBALCLASS | CS_IME | CS_HREDRAW | CS_VREDRAW; wndClass.style = CS_GLOBALCLASS | CS_IME | CS_HREDRAW | CS_VREDRAW;
......
...@@ -278,7 +278,7 @@ static struct list context_list = LIST_INIT( context_list ); ...@@ -278,7 +278,7 @@ static struct list context_list = LIST_INIT( context_list );
static struct WineGLInfo WineGLInfo = { 0 }; static struct WineGLInfo WineGLInfo = { 0 };
static struct wgl_pixel_format *pixel_formats; static struct wgl_pixel_format *pixel_formats;
static int nb_pixel_formats, nb_onscreen_formats; static int nb_pixel_formats, nb_onscreen_formats;
static int use_render_texture_emulation = 1; static BOOL use_render_texture_emulation = TRUE;
/* Selects the preferred GLX swap control method for use by wglSwapIntervalEXT */ /* Selects the preferred GLX swap control method for use by wglSwapIntervalEXT */
static enum glx_swap_control_method swap_control_method = GLX_SWAP_CONTROL_NONE; static enum glx_swap_control_method swap_control_method = GLX_SWAP_CONTROL_NONE;
...@@ -566,7 +566,7 @@ done: ...@@ -566,7 +566,7 @@ done:
static BOOL has_opengl(void) static BOOL has_opengl(void)
{ {
static int init_done; static BOOL init_done = FALSE;
static void *opengl_handle; static void *opengl_handle;
char buffer[200]; char buffer[200];
...@@ -574,7 +574,7 @@ static BOOL has_opengl(void) ...@@ -574,7 +574,7 @@ static BOOL has_opengl(void)
unsigned int i; unsigned int i;
if (init_done) return (opengl_handle != NULL); if (init_done) return (opengl_handle != NULL);
init_done = 1; init_done = TRUE;
/* No need to load any other libraries as according to the ABI, libGL should be self-sufficient /* No need to load any other libraries as according to the ABI, libGL should be self-sufficient
and include all dependencies */ and include all dependencies */
...@@ -2420,7 +2420,7 @@ static BOOL X11DRV_wglSetPbufferAttribARB( struct wgl_pbuffer *object, const int ...@@ -2420,7 +2420,7 @@ static BOOL X11DRV_wglSetPbufferAttribARB( struct wgl_pbuffer *object, const int
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return GL_FALSE; return GL_FALSE;
} }
if (1 == use_render_texture_emulation) { if (use_render_texture_emulation) {
return GL_TRUE; return GL_TRUE;
} }
return ret; return ret;
...@@ -2829,8 +2829,8 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer ) ...@@ -2829,8 +2829,8 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
return GL_FALSE; return GL_FALSE;
} }
if (1 == use_render_texture_emulation) { if (use_render_texture_emulation) {
static int init = 0; static BOOL initialized = FALSE;
int prev_binded_texture = 0; int prev_binded_texture = 0;
GLXContext prev_context; GLXContext prev_context;
Drawable prev_drawable; Drawable prev_drawable;
...@@ -2843,8 +2843,8 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer ) ...@@ -2843,8 +2843,8 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
This is mostly due to lack of demos/games using them. Further the use of glReadPixels This is mostly due to lack of demos/games using them. Further the use of glReadPixels
isn't ideal performance wise but I wasn't able to get other ways working. isn't ideal performance wise but I wasn't able to get other ways working.
*/ */
if(!init) { if(!initialized) {
init = 1; /* Only show the FIXME once for performance reasons */ initialized = TRUE; /* Only show the FIXME once for performance reasons */
FIXME("partial stub!\n"); FIXME("partial stub!\n");
} }
...@@ -2885,7 +2885,7 @@ static BOOL X11DRV_wglReleaseTexImageARB( struct wgl_pbuffer *object, int iBuffe ...@@ -2885,7 +2885,7 @@ static BOOL X11DRV_wglReleaseTexImageARB( struct wgl_pbuffer *object, int iBuffe
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return GL_FALSE; return GL_FALSE;
} }
if (1 == use_render_texture_emulation) { if (use_render_texture_emulation) {
return GL_TRUE; return GL_TRUE;
} }
return ret; return ret;
......
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