mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d9] Avoid setting cursor position if we are already at that position
Avoids an infinite loop where we trigger the cursor move window message which calls SetCursorPos and so on and so forth... Closes #1400
This commit is contained in:
parent
17166a8aeb
commit
f688889b41
@ -1,10 +1,15 @@
|
||||
#include "d3d9_cursor.h"
|
||||
#include "d3d9_util.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
void D3D9Cursor::UpdateCursor(int X, int Y) {
|
||||
POINT currentPos = { };
|
||||
if (::GetCursorPos(¤tPos) && currentPos == POINT{ X, Y })
|
||||
return;
|
||||
|
||||
::SetCursorPos(X, Y);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user