summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-03-21 22:23:56 +0100
committerAxel Davy <[email protected]>2015-08-21 22:21:45 +0200
commitdf6f1f77cc63db3e6a7c105f3e7bab246b576eb9 (patch)
treeb838aa75732c276c3b05c6101cfb4554378bc7ab /src
parent78b304e2f9f9ad9b97ac8665a44af09567159800 (diff)
st/nine: Do not call ID3DPresent_GetCursorPos for sw cursor
For sw cursor we do not tell wine the cursor position (the app tells us directly). We shouldn't use ID3DPresent_GetCursorPos. device->cursor.pos already contains the coordinates the app gave us. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: David Heidelberg <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index a62e6ad99d8..eb84d08eab0 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -575,9 +575,10 @@ handle_draw_cursor_and_hud( struct NineSwapChain9 *This, struct pipe_resource *r
blit.filter = PIPE_TEX_FILTER_NEAREST;
blit.scissor_enable = FALSE;
- ID3DPresent_GetCursorPos(This->present, &device->cursor.pos);
-
- /* NOTE: blit messes up when box.x + box.width < 0, fix driver */
+ /* NOTE: blit messes up when box.x + box.width < 0, fix driver
+ * NOTE2: device->cursor.pos contains coordinates relative to the screen.
+ * This happens to be also the position of the cursor when we are fullscreen.
+ * We don't use sw cursor for Windowed mode */
blit.dst.box.x = MAX2(device->cursor.pos.x, 0) - device->cursor.hotspot.x;
blit.dst.box.y = MAX2(device->cursor.pos.y, 0) - device->cursor.hotspot.y;
blit.dst.box.width = blit.src.box.width;