From e6b74abb7257ae02d01b1cc9e312c8e7e0a5d1ba Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 28 Apr 2026 16:58:38 -0700
Subject: [PATCH] Don't hide the cursor on iPadOS
We push the cursor around using a gamepad, so we need to draw our own cursor at the position we want it.
---
screenlib/SDL_FrameBuf.cpp | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/screenlib/SDL_FrameBuf.cpp b/screenlib/SDL_FrameBuf.cpp
index e630f45d..9840e02b 100644
--- a/screenlib/SDL_FrameBuf.cpp
+++ b/screenlib/SDL_FrameBuf.cpp
@@ -356,20 +356,11 @@ FrameBuf::SetCursor(SDL_Surface *image, int hotX, int hotY)
if (m_cursor) {
SDL_SetCursor(m_cursor);
} else {
- bool draw_cursor = true;
-#ifdef SDL_PLATFORM_IOS
- if (SDL_IsTablet()) {
- // iPadOS shows its own circular cursor
- draw_cursor = false;
- }
-#endif
- if (draw_cursor) {
- m_cursorTexture = SDL_CreateTextureFromSurface(m_renderer, image);
- m_cursorWidth = image->w;
- m_cursorHeight = image->h;
- m_cursorOffsetX = -hotX;
- m_cursorOffsetY = -hotY;
- }
+ m_cursorTexture = SDL_CreateTextureFromSurface(m_renderer, image);
+ m_cursorWidth = image->w;
+ m_cursorHeight = image->h;
+ m_cursorOffsetX = -hotX;
+ m_cursorOffsetY = -hotY;
}
UpdateCursorVisibility();
}