summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2018-09-15 20:39:23 +0200
committerAxel Davy <[email protected]>2018-09-25 22:05:24 +0200
commit112c7705973f619ac2a9bce8c8c53869256f69b4 (patch)
treec77fe01e4919b3f71f199bc08ff04abe25cbdc63
parent62ea55ec8b13bedefc28538a1a5de154bd33db1a (diff)
st/nine: Init cursor position at device creation
This is only useful for software cursor, but at least now we won't start it at (0, 0). Signed-off-by: Axel Davy <[email protected]>
-rw-r--r--src/gallium/state_trackers/nine/device9.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 9bb97bdf9c3..113ba9d975d 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -333,8 +333,11 @@ NineDevice9_ctor( struct NineDevice9 *This,
This->cursor.hotspot.y = -1;
This->cursor.w = This->cursor.h = 0;
This->cursor.visible = FALSE;
- This->cursor.pos.x = 0;
- This->cursor.pos.y = 0;
+ if (ID3DPresent_GetCursorPos(This->swapchains[0]->present, &This->cursor.pos) != S_OK) {
+ This->cursor.pos.x = 0;
+ This->cursor.pos.y = 0;
+ }
+
{
struct pipe_resource tmpl;
memset(&tmpl, 0, sizeof(tmpl));