migrant a SDL3
This commit is contained in:
@@ -10,14 +10,12 @@ namespace Mouse
|
||||
|
||||
void handleEvent(const SDL_Event &event)
|
||||
{
|
||||
if (event.type == SDL_MOUSEMOTION)
|
||||
if (event.type == SDL_EVENT_MOUSE_MOTION)
|
||||
{
|
||||
last_mouse_move_time = SDL_GetTicks();
|
||||
if (!cursor_visible)
|
||||
{
|
||||
#ifndef ARCADE
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
#endif
|
||||
SDL_ShowCursor();
|
||||
cursor_visible = true;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +26,7 @@ namespace Mouse
|
||||
Uint32 current_time = SDL_GetTicks();
|
||||
if (cursor_visible && (current_time - last_mouse_move_time > cursor_hide_time))
|
||||
{
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
SDL_HideCursor();
|
||||
cursor_visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user