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 - if SDL_ShowCursor fails to disable the cursor, a subsequent SDL_QUERY shows cursor enabled
Summary: if SDL_ShowCursor fails to disable the cursor, a subsequent SDL_QUERY shows c...
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.13
Hardware: ARM Android (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-24 17:29 UTC by Anthony @ POW Games
Modified: 2020-12-09 14:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.