diff options
author | Axel Davy <[email protected]> | 2015-03-22 18:48:07 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-08-21 22:21:45 +0200 |
commit | 78b304e2f9f9ad9b97ac8665a44af09567159800 (patch) | |
tree | 954d922e4b5268cdd17dc4528ef6c6e8eba7af35 /src/gallium/state_trackers | |
parent | 1b20eaff67fba9ac6310511c79d6de8851c39145 (diff) |
st/nine: Force hw cursor for Windowed mode
According to the spec, Windowed mode must
have hw cursor
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index fce19b2630d..9f6c90ed50b 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -611,9 +611,15 @@ NineDevice9_SetCursorProperties( struct NineDevice9 *This, user_assert(pCursorBitmap, D3DERR_INVALIDCALL); - This->cursor.w = MIN2(surf->desc.Width, This->cursor.image->width0); - This->cursor.h = MIN2(surf->desc.Height, This->cursor.image->height0); - hw_cursor = This->cursor.w == 32 && This->cursor.h == 32; + if (This->swapchains[0]->params.Windowed) { + This->cursor.w = MIN2(surf->desc.Width, 32); + This->cursor.h = MIN2(surf->desc.Height, 32); + hw_cursor = 1; /* always use hw cursor for windowed mode */ + } else { + This->cursor.w = MIN2(surf->desc.Width, This->cursor.image->width0); + This->cursor.h = MIN2(surf->desc.Height, This->cursor.image->height0); + hw_cursor = This->cursor.w == 32 && This->cursor.h == 32; + } u_box_origin_2d(This->cursor.w, This->cursor.h, &box); |