From 30e187e019a33c6a9ba84205e0c9bdb1eff68bd8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 16 May 2011 20:13:13 +0200 Subject: [PATCH] wined3d: Get rid of the haveHardwareCursor flag. --- dlls/wined3d/device.c | 11 +++-------- dlls/wined3d/wined3d_private.h | 3 +-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 74c6e04c06f..a4e85befb97 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -870,7 +870,7 @@ ULONG CDECL wined3d_device_decref(struct wined3d_device *device) ERR("Context array not freed!\n"); if (device->hardwareCursor) DestroyCursor(device->hardwareCursor); - device->haveHardwareCursor = FALSE; + device->hardwareCursor = 0; wined3d_decref(device->wined3d); device->wined3d = NULL; @@ -5203,11 +5203,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device device->cursorTexture = 0; } - if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32) - device->haveHardwareCursor = TRUE; - else - device->haveHardwareCursor = FALSE; - if (cursor_image) { WINED3DLOCKED_RECT rect; @@ -5229,7 +5224,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device return WINED3DERR_INVALIDCALL; } - if (!device->haveHardwareCursor) + if (cursor_image->resource.width != 32 || cursor_image->resource.height != 32) { /* TODO: MSDN: Cursor sizes must be a power of 2 */ @@ -5369,7 +5364,7 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show) device->xScreenSpace = pt.x; device->yScreenSpace = pt.y; - if (device->haveHardwareCursor) + if (device->hardwareCursor) { device->bCursorVisible = show; if (show) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5973f0a055e..08a8469faa3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1680,14 +1680,13 @@ struct wined3d_device WORD isRecordingState : 1; WORD isInDraw : 1; WORD bCursorVisible : 1; - WORD haveHardwareCursor : 1; WORD d3d_initialized : 1; WORD inScene : 1; /* A flag to check for proper BeginScene / EndScene call pairs */ WORD softwareVertexProcessing : 1; /* process vertex shaders using software or hardware */ WORD useDrawStridedSlow : 1; WORD instancedDraw : 1; WORD filter_messages : 1; - WORD padding : 3; + WORD padding : 4; BYTE fixed_function_usage_map; /* MAX_TEXTURES, 8 */