The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_Window_Fullscreen issues on Mac with multiple monitors
miorizzo


Joined: 11 Aug 2014
Posts: 1
I'm experiencing an issue with the SDL_Window_Fullscreen flag when running on a Mac with more than one monitor.

When fullscreen is activated in this way, my app will appear correctly in fullscreen, but all other monitors go black. I've debugged to check that the height and width values for the window are correct, because I'd assumed that maybe it was creating a huge window that spanned the entire width of my setup, but this isn't the case; All of the values check out. Related to this issue is that when I try to exit from fullscreen after having either started the app in fullscreen or switched to fullscreen from windowed mode, the viewport resizes to the values I'd expect, but the area around the new 'window' is still black, as are the other monitors.

When the screen is set to fullscreen the code is:

SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);

When it is being switched to windowed the code is:

SDL_SetWindowFullscreen(window, 0);

This works fine on windows.

As a temporary fix for the matter I've switched to using SDL_WINDOW_FULLSCREEN_DESKTOP, but I would prefer to use the original flag.

Is this a known issue, and is there a fix for it?

Thanks in advance!
Dominus


Joined: 13 Oct 2009
Posts: 127
This has been bugging me as well for a while. The DESKTOP thing works fine or let's say good enough on SDL2.

Is there an equivalent for SDL 1.2x?
SDL_Window_Fullscreen issues on Mac with multiple monitors
Joseph Carter


Joined: 20 Sep 2013
Posts: 279
*grumble* SDL 1.2 API emulator needed *grumble*

I'm not sure how to do it on the technical side mostly because a lot of SDL function names didn't change, but their arguments did.

Maybe have to load SDL2 at runtime like OpenGL is and load it's function pointers to a structure giving them a namespace?

There was some backward compatibility stuff on Linux where SDL had to provide a lot of X11 symbols on Linux to satisfy ld.so, that'd need addressing for full ABI compatibility, but I'd like to see API as a place to start.

Joseph
Sent via mobile

Quote:
On Jan 10, 2015, at 06:29, Dominus wrote:

This has been bugging me as well for a while. The DESKTOP thing works fine or let's say good enough on SDL2.

Is there an equivalent for SDL 1.2x?
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_Window_Fullscreen issues on Mac with multiple monitors
Jonas Kulla
Guest

2015-01-14 5:08 GMT+01:00 T. Joseph Carter:
Quote:
*grumble* SDL 1.2 API emulator needed *grumble*

I'm not sure how to do it on the technical side mostly because a lot of SDL function names didn't change, but their arguments did.

Maybe have to load SDL2 at runtime like OpenGL is and load it's function pointers to a structure giving them a namespace?

There was some backward compatibility stuff on Linux where SDL had to provide a lot of X11 symbols on Linux to satisfy ld.so, that'd need addressing for full ABI compatibility, but I'd like to see API as a place to start.


With the dynamic dispatch table stuff added, all SDL functions are internally suffixed with "_REAL",
so maybe that could be leveraged to not get conflicts without having to go fullblown dlsym on everything.