Bug on Linux with SDL Fullscreen

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

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 at 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 at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.

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.

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 at 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 at 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 at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.


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


Gabriel.

2013/11/1 Gabriel Jacobo

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.

Which by the way is also what eg. Dota 2 does under the hood. I would
recommend always
doing this when working with FULLSCREEN_DESKTOP because then you don’t
really have
to worry about what desktop resolution the user is running with; you always
render to the
same “internal” resolution. Only on the final blit to screen (ie.
RenderCopy) does it matter.

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.

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 at 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 at 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 at 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 at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.


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


Gabriel.


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


Gabriel.

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.

2013/11/2 Gabriel Jacobo

Full screen desktop takes the resolution of each monitor separately, at
least with a half sane xrandr support…

Wait, this is actually something I too have been burning to know. One of my
users once
asked me “can you implement borderless window support?”. When I asked for
what purpose,
he responeded “normal fullscreen destroys my multi monitor setup on Linux,
because it tries
to fill both screens”. If I make a window under SDL FULLSCREEN_DESKTOP,
does it only
fill the screen on which the window is currently on / the main screen ?

FULLSCREEN_DESKTOP works as expected and takes up only one monitor in
many window managers who support the fullscreen window flag.On Sat, Nov 2, 2013 at 5:29 PM, Jonas Kulla wrote:

2013/11/2 Gabriel Jacobo

Full screen desktop takes the resolution of each monitor separately, at
least with a half sane xrandr support…

Wait, this is actually something I too have been burning to know. One of my
users once
asked me “can you implement borderless window support?”. When I asked for
what purpose,
he responeded “normal fullscreen destroys my multi monitor setup on Linux,
because it tries
to fill both screens”. If I make a window under SDL FULLSCREEN_DESKTOP, does
it only
fill the screen on which the window is currently on / the main screen ?


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

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.

Does nobody has a solution? Can I do some more thinks to help fixing that
bug?
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.
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.

Hallo,
during my gameport on SDL2 it seems i have found another bug.
Starting my app on android works nicely and the mouseevents work without
any modification of the pc version.
But there is a problem of multiple touches.
Using 2 fingers on screen works. Using 3 fingers at the same time on the
screen will block the complete mouseinput and it doesn’t come back again.
Rendering does not stop but mouseinput doesn’t work anymore.
Is that a bug of SDL? In my opinion yes.
I’m using the HTC One mini for testing.
Best regards,
Artem

I get a Xperia E for testing from a friend and on this smartphone the bug
not occures. Seems to be a more tricky problem.
What can I do to analyse the problem in more detail? Or does anybody see
the problem in code?
Hallo,
during my gameport on SDL2 it seems i have found another bug.
Starting my app on android works nicely and the mouseevents work without
any modification of the pc version.
But there is a problem of multiple touches.
Using 2 fingers on screen works. Using 3 fingers at the same time on the
screen will block the complete mouseinput and it doesn’t come back again.
Rendering does not stop but mouseinput doesn’t work anymore.
Is that a bug of SDL? In my opinion yes.
I’m using the HTC One mini for testing.
Best regards,
Artem

I have checked the Events, now.
SDL_MOUSEMOTION -> Does not react anymore
SDL_FINGERMOTION -> Does work as expected
Seems to be problem of the mapping from Touchevent to Mouseevent.
I get a Xperia E for testing from a friend and on this smartphone the bug
not occures. Seems to be a more tricky problem.
What can I do to analyse the problem in more detail? Or does anybody see
the problem in code?
Hallo,
during my gameport on SDL2 it seems i have found another bug.
Starting my app on android works nicely and the mouseevents work without
any modification of the pc version.
But there is a problem of multiple touches.
Using 2 fingers on screen works. Using 3 fingers at the same time on the
screen will block the complete mouseinput and it doesn’t come back again.
Rendering does not stop but mouseinput doesn’t work anymore.
Is that a bug of SDL? In my opinion yes.
I’m using the HTC One mini for testing.
Best regards,
Artem

Can you report a bug on bugzilla, with any information you’ve found?
http://bugzilla.libsdl.org

Thanks!On Thu, Nov 7, 2013 at 2:08 AM, Artem Metra <Artem.Metra at gmx.de> wrote:

I have checked the Events, now.
SDL_MOUSEMOTION -> Does not react anymore
SDL_FINGERMOTION -> Does work as expected

Seems to be problem of the mapping from Touchevent to Mouseevent.
I get a Xperia E for testing from a friend and on this smartphone the
bug not occures. Seems to be a more tricky problem.

What can I do to analyse the problem in more detail? Or does anybody see
the problem in code?
Hallo,
during my gameport on SDL2 it seems i have found another bug.
Starting my app on android works nicely and the mouseevents work without
any modification of the pc version.
But there is a problem of multiple touches.
Using 2 fingers on screen works. Using 3 fingers at the same time on the
screen will block the complete mouseinput and it doesn’t come back again.
Rendering does not stop but mouseinput doesn’t work anymore.

Is that a bug of SDL? In my opinion yes.

I’m using the HTC One mini for testing.

Best regards,
Artem


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