[SDL] changing display resolution using SDL_WINDOW_FULLSCREEN with multiple displays not working on mac OS X (el capitan) ?

jeroen clarysse jeroen.clarysse at telenet.be
Mon Sep 26 05:21:34 PDT 2016


yep, that’s what I said in the mail :-)

I just added the SDL_WINDOW_FULLSCREEN_DESKTOP flag to explain that, *without* changing resolutions, everything runs fine. But, as I said in the mail : when I change it to SDL_WINDOW_FULLSCREEN instead, nothing happens

:-)




> On 26 Sep 2016, at 14:11, Kai Sterker <kai.sterker at gmail.com> wrote:
> 
> Have never tried multiple windows fullscreen on multiple monitors, but one thing that sticks out immediately is you using the SDL_WINDOW_FULLSCREEN_DESKTOP flag. This will not change resolution, but always keep current desktop resolution. At the very least, you'd want to use SDL_WINDOW_FULLSCREEN instead.
> 
> See https://wiki.libsdl.org/SDL_WindowFlags
> 
> Kai
> 
> On Mon, Sep 26, 2016 at 1:41 PM, jeroen clarysse <jeroen.clarysse at telenet.be> wrote:
> >
> > hi all,
> >
> > using THREE monitors, and trying to create two SDL_windows like this :
> >
> >         int display_main_num = 1;
> >         int display_2nd_num = 2;
> >
> >         m_main_window_w = 1024;
> >         m_main_window_h = 768;
> >         m_2nd_window_w = 1024;
> >         m_2nd_window_h = 768;
> >
> >         m_main_window = SDL_CreateWindow("Main window",SDL_WINDOWPOS_CENTERED_DISPLAY(display_main_num),SDL_WINDOWPOS_CENTERED_DISPLAY(display_main_num),m_main_window_w,m_main_window_h,SDL_WINDOW_SHOWN|SDL_WINDOW_FULLSCREEN_DESKTOP);
> >         m_main_renderer = SDL_CreateRenderer(m_main_window, -1, SDL_RENDERER_SOFTWARE);
> >
> >         m_2nd_window = SDL_CreateWindow("2nd window",SDL_WINDOWPOS_CENTERED_DISPLAY(display_2nd_num),SDL_WINDOWPOS_CENTERED_DISPLAY(display_2nd_num),m_2nd_window_w,m_2nd_window_h,SDL_WINDOW_SHOWN|SDL_WINDOW_FULLSCREEN_DESKTOP);
> >         m_2nd_renderer = SDL_CreateRenderer(m_2nd_window, -1, SDL_RENDERER_SOFTWARE);
> >
> >
> > this works nicely, but these call don't change resolutions yet. However, when I change the flags SDL_WINDOW_FULLSCREEN_DESKTOP to SDL_WINDOW_FULLSCREEN, SDL is supposed to change the resolution of both monitors to 1024 x 768. A lot happens on the screen : flickering windows, typical macos fullscreen resizing animation, flashing menu bar, …  but the whole function stays stuck in he first CreateWindow() call
> >
> > after I click around a bit, the code continues, but the windows are NOT fullscreen.
> >
> > has anyone succeeded in using multiple displays WITH resolution changes ?
> >
> >
> > I also tried with using only ONE display resolution and leaving the other at desktop res, but even that didn’t work
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



More information about the SDL mailing list