We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5297

Summary: if SDL_ShowCursor fails to disable the cursor, a subsequent SDL_QUERY shows cursor enabled
Product: SDL Reporter: Anthony @ POW Games <ant>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.13   
Hardware: ARM   
OS: Android (All)   

Description Anthony @ POW Games 2020-09-24 17:29:06 UTC
I have an old Android 4.2.2 device that has a nice graphical mouse cursor which cannot be disabled by SDL2. SDL_ShowCursor(SDL_DISABLE) will return 1 (SDL_ENABLE / shown) and fail to show the cursor and set error "That operation is not supported". All great so far.

But subsequent calls to SDL_ShowCursor(SDL_QUERY) will wrongly return 0 (SDL_DISABLE / hidden).

This bug has probably always existed and may exist cross platform. I'm guessing it's an easy fix.
Comment 1 Sam Lantinga 2020-12-09 14:38:18 UTC
SDL_ShowCursor() returns the previous state, not the new state, so I think the only issue is that it's not updating the cursor_shown state if setting a blank cursor fails.