1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Use SDL call for setting mouse position

This commit is contained in:
Mathieu Schroeter 2017-01-31 18:12:12 +01:00
parent 2956051dbf
commit 328dc4f2ba
2 changed files with 4 additions and 4 deletions

View File

@ -4,6 +4,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <ddraw.h>
#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

View File

@ -4,6 +4,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <ddraw.h>
#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);