migrant a SDL3

This commit is contained in:
2025-03-27 08:14:37 +01:00
parent a9c869baf6
commit d2286905dc
83 changed files with 570 additions and 541 deletions

View File

@@ -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;
}
}