Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse cursor invisible in full-screen SDL #26

Closed
qwach opened this issue Apr 4, 2013 · 5 comments
Closed

Mouse cursor invisible in full-screen SDL #26

qwach opened this issue Apr 4, 2013 · 5 comments

Comments

@qwach
Copy link

qwach commented Apr 4, 2013

With something as mouse-oriented as Mac OS 9, this is sort of a problem. The SDL FAQ (http://sdl.beuc.net/sdl.wiki/FAQ_Mouse_Cursor_Disappears_in_Fullscreen) has the following to say about it: "You're directly accessing the video memory, and the video driver doesn't support hardware cursor overlays. Simply create the cursor as a sprite and blit it onto the screen where the mouse cursor coordinates are."

@qwach
Copy link
Author

qwach commented Apr 4, 2013

Ubuntu 12.10, self-compiled from version 7782a40.

@vasi
Copy link
Contributor

vasi commented Apr 5, 2013

It looks like in fullscreen SDL on Linux, video_can_change_cursor() indicates that we should use a hardware cursor, but the driver_fullscreen constructor expects a software cursor and doesn't initialize the hardware one.

It used to be that fullscreen always used a software cursor, but commit be28a8e put the check if (display_type != DISPLAY_WINDOW) return false inside an #ifdef APPLE . Was this an accident? Moving the check out of the ifdef makes the cursor work again.

Alternatively, if I make driver_fullscreen initialize the hardware cursor, that seems to work too. Is there a reason why the hardware cursor isn't used in fullscreen mode?

@RonaldPR
Copy link

RonaldPR commented Apr 5, 2013


Op 5 april 2013, om 06:56, schreef Dave Vasilevsky notifications@github.com:

Is there a reason why the hardware cursor isn't used in fullscreen mode?

I suppose it has/had to do with different SDL versions. SDL (I forgot which version) did support the hardware cursor in window mode only, then later SDL versions did not support the hardware cursor at all (also not in window mode), and now current versions do support the hardware cursor again, at least in window mode. Probably no one tried if the hardware cursor was now also supported in fullscreen mode.

Ronald.

@vasi
Copy link
Contributor

vasi commented Apr 5, 2013

Ronald, I think that issue with SDL was only on Macs. AFAIK, the Linux code always used a hardware cursor in windowed SDL mode.

@qwach
Copy link
Author

qwach commented Apr 28, 2013

I can see the mouse cursor fine now, but it's much too fast, and I can't run Mac OS 9 at my native resolution anymore. I'll open separate issues for that.

@qwach qwach closed this as completed Apr 28, 2013
ianfixes pushed a commit to emaculation/macemu that referenced this issue Mar 1, 2019
Issue: cebix/macemu#26

On non-Mac platforms, driver_fullscreen constructor sets up software cursor,
but switch_to_current_mode() ask for a hardware cursor, possibly due to a typo.
Neither one ends up being drawn, so the cursor goes invisible.

This change makes them agree to use a software cursor. We should eventually
move to just one place deciding which cursor to use, so they don't have to be
kept in sync.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants