wined3d: Get rid of the haveHardwareCursor flag.

This commit is contained in:
Alexandre Julliard 2011-05-16 20:13:13 +02:00
parent d52ae4b63f
commit 30e187e019
2 changed files with 4 additions and 10 deletions

View File

@ -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)

View File

@ -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 */