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

Move stuff for mouse motions with demo

This commit is contained in:
Mathieu Schroeter 2017-02-02 17:53:53 +01:00
parent f40b29f0ec
commit b6cee1bcc8

View File

@ -4553,7 +4553,6 @@ void CEvent::WinToSDLEvent (UINT msg, WPARAM wParam, LPARAM lParam, SDL_Event &e
// TODO: wParam CTRL or SHIFT
event.motion.x = GET_X_LPARAM (lParam);
event.motion.y = GET_Y_LPARAM (lParam);
SDL_WarpMouseInWindow (nullptr, event.motion.x, event.motion.y);
break;
}
}
@ -4571,7 +4570,6 @@ void CEvent::DemoStep()
UINT message;
WPARAM wParam;
LPARAM lParam;
POINT pos;
if ( m_phase == WM_PHASE_INIT )
{
@ -4595,10 +4593,9 @@ void CEvent::DemoStep()
lParam = m_pDemoBuffer[m_demoIndex].lParam;
m_demoIndex ++;
if ( message == WM_MOUSEMOVE &&
m_mouseType == MOUSETYPEWIN )
if (message == WM_MOUSEMOVE)
{
pos = ConvLongToPos(lParam);
POINT pos = ConvLongToPos (lParam);
SDL_WarpMouseInWindow (g_window, pos.x, pos.y);
}