SDL & Fullscreen on Windows

Discuss SDL programming with the RebelSDL plugin here
Post Reply
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

SDL & Fullscreen on Windows

Post by fingus »

When using:

Code: Select all

@display {width = 1920, height = 1080, mode = "fullscreen"}
@require "rebelsdl"
 
There are differences between Windows and Linux.

On the Same Hardware:

-> On Linux it seems to be a real Fullscreen-Mode with SDL/OpenGL with Fullspeed-Rendering 60fps (Always show 1:1 Pixelratio with no Scaling, on 1920x1200 Screens you have two black bars top/bottom which is okay)

-> On Windows it have two differences:

- It takes the Desktop-Scaling-Factor into account, you see just top left square of my 1920x1080-Renderscreen, so no real Fullscreen use?
- It seems not to utilise SDL, it shows using Direct3d but the Rendering-Time is very worse and stuttery like don´t using SDL

So i can´t believe the Hardware is too weak when it works on the same Hardware on Linux!

Specially on the Microsoft Surface-Devices (I tested it on Surface Laptop and Surface Tablet) you can reproduce it.

In most cases if the Computer have dedicated Graphics-Chip it works smoothly on Windows, so this might be a Driver-initialisation-Issue. We have test it under Windows on a Laptop in a Docking-Station -> Stuttering, when undocked -> Smoothly.

I also try:

Code: Select all

@require "rebelsdl", {renderdriver = "opengl", UseDesktopFullScreen = true}
Doesn´t work. It choose only Direct3d and seems to ignore UseDesktopFullScreen.

or as @DISPLAY-Table autofullscreen/systemscale then its too small on Surface-Devices.
User avatar
airsoftsoftwair
Posts: 5619
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SDL & Fullscreen on Windows

Post by airsoftsoftwair »

fingus wrote: Tue Oct 31, 2023 12:28 pm - It takes the Desktop-Scaling-Factor into account, you see just top left square of my 1920x1080-Renderscreen, so no real Fullscreen use?
AFAIR this was an SDL "feature" in the way that SDL always used the host OS coordinate space so on Windows all coordinate and size values are in hard pixels whereas on Linux/macOS they are in virtual pixels, i.e. adapted to the desktop scaling factor. AFAIR it was discussed on the SDL mailing list back then to change this behaviour for a better consistency so it could be that newer SDL versions deal with that better. Another reason to update to a newer SDL ;)
fingus wrote: Tue Oct 31, 2023 12:28 pm - It seems not to utilise SDL, it shows using Direct3d but the Rendering-Time is very worse and stuttery like don´t using SDL
Well, if it uses Direct3D then it must be using SDL...
fingus wrote: Tue Oct 31, 2023 12:28 pm Specially on the Microsoft Surface-Devices (I tested it on Surface Laptop and Surface Tablet) you can reproduce it.
Sorry, don't have such a device.
fingus wrote: Tue Oct 31, 2023 12:28 pm In most cases if the Computer have dedicated Graphics-Chip it works smoothly on Windows, so this might be a Driver-initialisation-Issue. We have test it under Windows on a Laptop in a Docking-Station -> Stuttering, when undocked -> Smoothly.
Yes, likely a driver issue. Or also related to outdated SDL version used by RebelSDL.
fingus wrote: Tue Oct 31, 2023 12:28 pm Doesn´t work. It choose only Direct3d and seems to ignore UseDesktopFullScreen.
Only on Surface devices or generally?
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: SDL & Fullscreen on Windows

Post by fingus »

airsoftsoftwair wrote: Fri Nov 03, 2023 11:18 pm
fingus wrote: Tue Oct 31, 2023 12:28 pm

Code: Select all

@require "rebelsdl", {renderdriver = "opengl", UseDesktopFullScreen = true}
Doesn´t work. It choose only Direct3d and seems to ignore UseDesktopFullScreen.
Only on Surface devices or generally?
Generally under Windows 10/11.
Post Reply