Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Rishel <rishel.nick@gmail.com>2021-02-17 05:10:42 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2021-02-17 05:10:42 +0300
commit5c523c6578500fa8a8da676627d4e453db142cd3 (patch)
tree67d0f1c3916f64b4a02ce5623524c17a1b6846ed
parent461d4fc1aae200a6310a254b6e7c08070d9e94a7 (diff)
parentab210098424bf53b1fdac3de2d016d3e4aa04bfe (diff)
Merge branch 'blender-v2.92-release'
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 1e79d9dbaaf..c5506902d59 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -531,20 +531,7 @@ GHOST_TSuccess GHOST_SystemWin32::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32
{
if (!::GetActiveWindow())
return GHOST_kFailure;
-
- INPUT input;
- input.type = INPUT_MOUSE;
- input.mi.mouseData = 0;
- input.mi.time = ::GetTickCount();
- /* Map from virtual screen to 0-65535 inclusive. */
- input.mi.dx = (x - GetSystemMetrics(SM_XVIRTUALSCREEN)) * 65535 /
- (GetSystemMetrics(SM_CXVIRTUALSCREEN) - 1);
- input.mi.dy = (y - GetSystemMetrics(SM_YVIRTUALSCREEN)) * 65535 /
- (GetSystemMetrics(SM_CYVIRTUALSCREEN) - 1);
- input.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK;
- SendInput(1, &input, sizeof(input));
-
- return GHOST_kSuccess;
+ return ::SetCursorPos(x, y) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}
GHOST_TSuccess GHOST_SystemWin32::getModifierKeys(GHOST_ModifierKeys &keys) const