diff --git a/event.cpp b/event.cpp index e9eb61f..2859c9b 100644 --- a/event.cpp +++ b/event.cpp @@ -4,6 +4,7 @@ #include #include #include +#include "blupi.h" #include "def.h" #include "resource.h" #include "pixmap.h" @@ -4504,8 +4505,7 @@ void CEvent::DemoStep() m_mouseType == MOUSETYPEWIN ) { pos = ConvLongToPos(lParam); - ClientToScreen(m_hWnd, &pos); - SetCursorPos(pos.x, pos.y); + SDL_WarpMouseInWindow (g_window, pos.x, pos.y); } TreatEventBase(nullptr); // XXX: use SDL_Event diff --git a/menu.cpp b/menu.cpp index 6122ddc..8e9da76 100644 --- a/menu.cpp +++ b/menu.cpp @@ -4,6 +4,7 @@ #include #include #include +#include "blupi.h" #include "def.h" #include "resource.h" #include "pixmap.h" @@ -118,8 +119,7 @@ bool CMenu::Create(HWND hWnd, CPixmap *pPixmap, CSound *pSound, pos = m_pos; pos.x += DIMBUTTONX/2; pos.y += DIMBUTTONY/2; - ClientToScreen(m_hWnd, &pos); - SetCursorPos(pos.x, pos.y); + SDL_WarpMouseInWindow (g_window, pos.x, pos.y); } m_selRank = Detect(pos);