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:
parent
f40b29f0ec
commit
b6cee1bcc8
@ -4553,7 +4553,6 @@ void CEvent::WinToSDLEvent (UINT msg, WPARAM wParam, LPARAM lParam, SDL_Event &e
|
|||||||
// TODO: wParam CTRL or SHIFT
|
// TODO: wParam CTRL or SHIFT
|
||||||
event.motion.x = GET_X_LPARAM (lParam);
|
event.motion.x = GET_X_LPARAM (lParam);
|
||||||
event.motion.y = GET_Y_LPARAM (lParam);
|
event.motion.y = GET_Y_LPARAM (lParam);
|
||||||
SDL_WarpMouseInWindow (nullptr, event.motion.x, event.motion.y);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4571,7 +4570,6 @@ void CEvent::DemoStep()
|
|||||||
UINT message;
|
UINT message;
|
||||||
WPARAM wParam;
|
WPARAM wParam;
|
||||||
LPARAM lParam;
|
LPARAM lParam;
|
||||||
POINT pos;
|
|
||||||
|
|
||||||
if ( m_phase == WM_PHASE_INIT )
|
if ( m_phase == WM_PHASE_INIT )
|
||||||
{
|
{
|
||||||
@ -4595,10 +4593,9 @@ void CEvent::DemoStep()
|
|||||||
lParam = m_pDemoBuffer[m_demoIndex].lParam;
|
lParam = m_pDemoBuffer[m_demoIndex].lParam;
|
||||||
m_demoIndex ++;
|
m_demoIndex ++;
|
||||||
|
|
||||||
if ( message == WM_MOUSEMOVE &&
|
if (message == WM_MOUSEMOVE)
|
||||||
m_mouseType == MOUSETYPEWIN )
|
|
||||||
{
|
{
|
||||||
pos = ConvLongToPos(lParam);
|
POINT pos = ConvLongToPos (lParam);
|
||||||
SDL_WarpMouseInWindow (g_window, pos.x, pos.y);
|
SDL_WarpMouseInWindow (g_window, pos.x, pos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user