I checked it with SDL_GetWindowSize(mWindow, &w, &h); the window has a
resolution of 3840x1080, so I think its wrong (or not?).
Changed the window creation to:
mWindow = SDL_CreateWindow(AppTitle,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
Both monitors can be used for dispaying stuff. Is there no way to use only
one monitor and show on the second the normal desktop like in dota 2? It
seems they do it on another way.Gesendet: Samstag, 02. November 2013 um 19:00 Uhr
Von: "Artem Metra"
An: "SDL Development List"
Betreff: Re: [SDL] Bug on Linux with SDL Fullscreen
Here the output of xrandr -q.
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 disconnected (normal left inverted right x axis y axis)
DFP3 disconnected (normal left inverted right x axis y axis)
DFP4 connected 1920x1080+0+0 (normal left inverted right x axis y axis)
477mm x 268mm
1920x1080 60.0*+
1680x1050 60.0
1400x1050 60.0
1600x900 60.0
1360x1024 60.0
1280x1024 75.0 60.0
1440x900 60.0
1280x960 75.0 60.0
1152x864 60.0 75.0
1280x768 75.0 60.0
1280x720 75.0 60.0
1024x768 75.0 60.0
800x600 75.0 60.3
640x480 75.0 59.9
CRT1 disconnected (normal left inverted right x axis y axis)
CRT2 connected 1920x1080+1920+0 (normal left inverted right x axis y axis)
477mm x 268mm
1920x1080 60.0*+
1680x1050 60.0
1400x1050 60.0
1600x900 60.0
1360x1024 60.0
1280x1024 75.0 60.0
1440x900 60.0
1280x960 75.0 60.0
1152x864 60.0 75.0
1280x768 75.0 60.0
1280x720 75.0 60.0
1024x768 75.0 60.0
800x600 75.0 60.3
640x480 75.0 59.9
Full screen desktop takes the resolution of each monitor separately, at
least with a half sane xrandr support…
Are you getting a different result? Can you post the output of “xrandr -q”
?
Thanks!
2013/11/2 Artem Metra Artem.Metra@gmx.de
Ok, this seems to be the way to go, thanks for that!
But what about multimonitor support? Fullscreen Desktop takes the
desktop resolution and takes hence both screens. Is there a solution,
that only one monitor is considered, not both? In Dota 2 they do that.
Results vary depending on Linux version, drivers, xrandr support, window
manager, etc. On my KDE+nvidia system, it works like a charm for
example. If you can figure out what works/doesn’t work for your system
please document as much as possible on the bug tracker, or even better,
send us a patch!
My 2 cents regarding the SDL_SetRenderLogicalSize problems, which may or
may not be solvable to everyones satisfaction and I haven’t followed the
reasoning behind it, is to just use a workaround. Create a Texture of
your desired full screen size (800x600), use it as a render target,
render everything there, and finally RenderCopy it to the screen
with/without aspect correction/whatever. You’ll also need to apply
proper scaling to input events to they have real meaning in your 800x600
space.
2013/11/1 Artem Metra Artem.Metra@gmx.de
Yes this works. But is there no way to fix the fullscreen mode? SDL
1.2 works perfectly.
With fullscreen_desktop i have the problem reported here:
https://bugzilla.libsdl.org/show_bug.cgi?id=2179
So from bug to the other :(.
I believe Valve runs all games with SDL_WINDOW_FULLSCREEN_DESKTOP
instead of SDL_WINDOW_FULLSCREEN, give it a try.
2013/11/1 Artem Metra <Artem.Metra@gmx.de>
Hallo,
I have a real strange problem with the actual SDL 2.0.1 fullscreen
on linux and i think its a bug of SDL.
Here a small snap of the Code I'm using for modesetting:
Uint32 screenFlags = 0;
if (fullscreen)
screenFlags |= SDL_WINDOW_FULLSCREEN;
// Create window
mWindow = SDL_CreateWindow(AppTitle,
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
800, 600,
screenFlags);
// Create renderer to draw in window
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
There are 3 different behaviers of this code on linux:
1. When fullscreen = 0 everything is fine and the whole think work
like it should
2. When fullscreen = 1 i got a blackscreen, input etc. is still
working
3. When fullscreen = 1 and i set the renderer with
SDL_RENDERER_PRESENTVSYNC flag i got a screen with mostly correct
drawing but with some graphic glitches
So it's extremly buggy at all. The same code works btw nice on
windows.
Here are my system specs:
2 Monitors (both full-hd but can display 800x600 resolution)
Radeon HD 5770 with different driver versions tested upto the newest
beta (paketversion: 9.012-121219a-151962C-ATI)
Linux Mint 15 Cinnamon-Edition
Games like Dota 2 (Which uses SDL) are working well. So I think it's
not a driver problem.
Best regards,
Artem
_______________________________________________
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
--
Gabriel.
_______________________________________________
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Gabriel.
SDL mailing list
SDL@lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Gabriel.