Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)

Hi,
I have a question about how to use SDL_CreateWindow with
SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the
whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and
android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem

I think that’s the expected behavior. Try the same code under Windows or Mac OS X, or even using different render drivers.Sent from my iPod

On 23 ??? 2013, at 5:24 ?.?., “Artem Metra” <Artem.Metra at gmx.de> wrote:

Hi,
I have a question about how to use SDL_CreateWindow with SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem


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

I doubt that’s the expected behavior…

2013/10/23, neoaggelos at gmail.com :> I think that’s the expected behavior. Try the same code under Windows or Mac

OS X, or even using different render drivers.

Sent from my iPod

On 23 ??? 2013, at 5:24 ?.?., “Artem Metra” <Artem.Metra at gmx.de> wrote:

Hi,
I have a question about how to use SDL_CreateWindow with
SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the
whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and
android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem


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

HOW ABOUT THIS FOR UNEXPECTED BEHAVIOR?

GRRAAAHH!!!

(??? ???On Wed, Oct 23, 2013 at 2:19 PM, Sik the hedgehog < sik.the.hedgehog at gmail.com> wrote:

I doubt that’s the expected behavior…

2013/10/23, neoaggelos at gmail.com :

I think that’s the expected behavior. Try the same code under Windows or
Mac
OS X, or even using different render drivers.

Sent from my iPod

On 23 ??? 2013, at 5:24 ?.?., “Artem Metra” <Artem.Metra at gmx.de> wrote:

Hi,
I have a question about how to use SDL_CreateWindow with
SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the
whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and
android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem


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

So, does the logical resolution setting stretch to fit the window or does
it scale while maintaining aspect ratio?

Jonny DOn Wed, Oct 23, 2013 at 2:29 PM, Jonathan Dearborn <@Jonathan_Dearborn>wrote:

HOW ABOUT THIS FOR UNEXPECTED BEHAVIOR?

GRRAAAHH!!!

(??? ???

On Wed, Oct 23, 2013 at 2:19 PM, Sik the hedgehog < sik.the.hedgehog at gmail.com> wrote:

I doubt that’s the expected behavior…

2013/10/23, neoaggelos at gmail.com :

I think that’s the expected behavior. Try the same code under Windows
or Mac
OS X, or even using different render drivers.

Sent from my iPod

On 23 ??? 2013, at 5:24 ?.?., “Artem Metra” <Artem.Metra at gmx.de> wrote:

Hi,
I have a question about how to use SDL_CreateWindow with
SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the
whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and
android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem


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

There are a couple bugs in SDL_RenderSetLogicalSize:
?- it always attempts to preserve the aspect ratio of the underlying window, whether or not your specified logical size matches this aspect ratio, enforcing this with letterboxing if necessary
?- it adds a scaling constant to internal calculations, meaning that SDL render operations now use a different coordinate system than raw API operations.? (Trying to render to a location such as (25,40) will give very different results with SDL_RenderCopy or OpenGL draw calls.)

Neither of these are correct behavior.? As the person who invented SDL_RenderSetLogicalSize in the first place, I can say that with authority.? Both of these behaviors are neither correct, desired, intended, or appreciated.? It’s been implemented very badly, and needs to be fixed.

Mason________________________________
From: Artem Metra <Artem.Metra at gmx.de>
To: sdl at lists.libsdl.org
Sent: Wednesday, October 23, 2013 7:24 AM
Subject: [SDL] Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)

Hi,
I have a question about how to use SDL_CreateWindow with SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem


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

Submitted as https://bugzilla.libsdl.org/show_bug.cgi?id=2179

I’m really not happy about this.? Can we have someone take a look at it please?

Mason________________________________
From: Mason Wheeler <@Mason_Wheeler>
To: SDL Development List
Sent: Wednesday, October 23, 2013 12:05 PM
Subject: Re: [SDL] Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)

There are a couple bugs in SDL_RenderSetLogicalSize:
?- it always attempts to preserve the aspect ratio of the underlying window, whether or not your specified logical size matches this aspect ratio, enforcing this with letterboxing if necessary
?- it adds a scaling constant to internal calculations, meaning that SDL render operations now use a different coordinate system than raw API operations.? (Trying to render to a location such as (25,40) will give very different results with SDL_RenderCopy or OpenGL draw calls.)

Neither of these are correct behavior.? As the person who invented SDL_RenderSetLogicalSize in the first place, I can say that with authority.? Both of these behaviors are neither correct, desired, intended, or appreciated.? It’s been implemented very badly, and needs to be
fixed.

Mason


From: Artem Metra <Artem.Metra at gmx.de>
To: sdl at lists.libsdl.org
Sent: Wednesday, October 23, 2013 7:24 AM
Subject: [SDL] Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)

Hi,
I have a question about how to use SDL_CreateWindow with SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
My game has a resulution of 800x600 and i want to stretch it over the whole screen (Android / Linux).
I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
0, 0,
SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”);
SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards,
Artem


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

Hi all,
so is the solution to avoid using SDL_RenderSetLogicalSize() until this is fixed?
Any proposed workarounds?

cheers,
rr

Mason Wheeler wrote:> Submitted as https://bugzilla.libsdl.org/show_bug.cgi?id=2179

I’m really not happy about this. Can we have someone take a look at it please?

Mason

From: Mason Wheeler
To: SDL Development List
Sent: Wednesday, October 23, 2013 12:05 PM
Subject: Re: [SDL] Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)

There are a couple bugs in SDL_RenderSetLogicalSize: - it always attempts to preserve the aspect ratio of the underlying window, whether or not your specified logical size matches this aspect ratio, enforcing this with letterboxing if necessary - it adds a scaling constant to internal calculations, meaning that SDL render operations now use a different coordinate system than raw API operations. (Trying to render to a location such as (25,40) will give very different results with SDL_RenderCopy or OpenGL draw calls.)Neither of these are correct behavior. As the person who invented SDL_RenderSetLogicalSize in the first place, I can say that with authority. Both of these behaviors are neither correct, desired, intended, or appreciated. It’s been implemented very badly, and needs to be fixed.
Mason

From: Artem Metra <Artem.Metra at gmx.de> To: sdl at lists.libsdl.org Sent: Wednesday, October 23, 2013 7:24 AM Subject: [SDL] Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)
Hi, I have a question about how to use SDL_CreateWindow with SDL_WINDOW_FULLSCREEN_DESKTOP flag set. My game has a resulution of 800x600 and i want to stretch it over the whole screen (Android / Linux). I think i did something wrong. What I did is the following:
mWindow = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 0, 0, SDL_WINDOW_FULLSCREEN_DESKTOP);
mRenderer = SDL_CreateRenderer(mWindow, -1, 0);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, “linear”); SDL_RenderSetLogicalSize(mRenderer, 800, 600);
This results in a unstretched result under linux (black borders) and android (blink borders). I have a FULL-HD 16:9 Display.
Have I missunderstand the SDL API or is it a bug?
Best regards, Artem

_______________________________________________SDL mailing listSDL at lists.libsdl.org (SDL at lists.libsdl.org)http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

_______________________________________________SDL mailing listSDL at lists.libsdl.org (SDL at lists.libsdl.org)http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

so is the solution to avoid using SDL_RenderSetLogicalSize() until this
is fixed?

The letterboxing is not a bug, it’s intentional behavior.

Any proposed workarounds?

If the letterboxing is a problem, use a logical size with the same
aspect ratio as SDL_GetWindowSize() reports, or don’t hardcode your game
to 800x600.

–ryan.

Letterboxing in SDL_SetRenderLogicalSize is not intentional behavior; it is a bug.? The same goes for the hidden, magical scaling factor it introduces.

I created the API; I know what it’s supposed to do, and that’s not it.? If the behavior was intended by the person who implemented the API in its current form, that person did not understand the API.

Mason

so is the solution to avoid using SDL_RenderSetLogicalSize() until this
is fixed?

The letterboxing is not a bug, it’s intentional behavior.

Any proposed workarounds?

If the letterboxing is a problem, use a logical size with the same
aspect ratio as SDL_GetWindowSize() reports, or don’t hardcode your game
to 800x600.

–ryan.On Friday, November 8, 2013 9:06 PM, Ryan C. Gordon wrote:


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

Why is this a bug?
Letterboxing seems to be a reasonable behaviour if the aspect ratios of
the game and the window are different.On 11/9/2013 5:21 PM, Mason Wheeler wrote:

Letterboxing in SDL_SetRenderLogicalSize is not intentional behavior;
it is a bug. The same goes for the hidden, magical scaling factor it
introduces.

I created the API; I know what it’s supposed to do, and that’s not
it. If the behavior was intended by the person who implemented the
API in its current form, that person did not understand the API.

Mason

On Friday, November 8, 2013 9:06 PM, Ryan C. Gordon wrote:

so is the solution to avoid using SDL_RenderSetLogicalSize() until this
is fixed?

The letterboxing is not a bug, it’s intentional behavior.

Any proposed workarounds?

If the letterboxing is a problem, use a logical size with the same
aspect ratio as SDL_GetWindowSize() reports, or don’t hardcode your game
to 800x600.

–ryan.


SDL mailing list
SDL at lists.libsdl.org <mailto: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


Pallav Nawani
Game Designer/CEO
http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming

For a very simple reason:? If you want letterboxing and the API does not magically provide it, it’s not difficult to implement it yourself.? But if you don’t want letterboxing and the API tries to force it on you, it’s a lot more work for you to get it right.

Mason

Why is this a bug?
Letterboxing seems to be a reasonable behaviour if the aspect ratios of
the game and the window are different.On Saturday, November 9, 2013 4:36 AM, Pallav Nawani wrote:

On 11/9/2013 5:21 PM, Mason Wheeler wrote:

Letterboxing in SDL_SetRenderLogicalSize is not intentional behavior;
it is a bug.? The same goes for the hidden, magical scaling factor it
introduces.

I created the API; I know what it’s supposed to do, and that’s not
it.? If the behavior was intended by the person who implemented the
API in its current form, that person did not understand the API.

Mason

On Friday, November 8, 2013 9:06 PM, Ryan C. Gordon wrote:

so is the solution to avoid using SDL_RenderSetLogicalSize() until this
is fixed?

The letterboxing is not a bug, it’s intentional behavior.

Any proposed workarounds?

If the letterboxing is a problem, use a logical size with the same
aspect ratio as SDL_GetWindowSize() reports, or don’t hardcode your game
to 800x600.

–ryan.


SDL mailing list
SDL at lists.libsdl.org <mailto: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


Pallav Nawani
Game Designer/CEO
http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming


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

If the behavior was intended by the person who implemented the API in
its current form, that person did not understand the API.

I understand that you don’t like how the API evolved from your original
intention, but the thing that makes that function awesome is not that
you can scale drawing operations with it, but that you can call one
function and magically your old game works well on modern hardware: a
320x240 DOS game doesn’t have to run in a window that looks like a
postage stamp on a modern display.

Standard monitors have changed from a 4:3 aspect ratio in modern times,
and when you add FULLSCREEN_DESKTOP into the mix, making this work right
for apps that weren’t prepared for modern systems, with no fuss, is
insanely powerful stuff.

It might not be specifically what you envisioned, but it’s one of the
best new things in SDL2.

–ryan.

If the behavior was intended by the person who implemented the API in
its current form, that person did not understand the API.

I understand that you don’t like how the API evolved from your original
intention, but the thing that makes that function awesome is not that
you can scale drawing operations with it, but that you can call one
function and magically your old game works well on modern hardware: a
320x240 DOS game doesn’t have to run in a window that looks like a
postage stamp on a modern display.

Nothing in the way I designed the API conflicts with this goal, but that is still not the point of the API.? The point of it is one very specific piece of functionality that has nothing whatsoever to do with fullscreen: to map a set of pixels with one size onto a window with a different size in pixels.? I created this to make it easier to implement zooming in my game editor, and when someone else re-implements it in a way that breaks the intended use case, it is buggy.

Standard monitors have changed from a 4:3 aspect ratio in modern times,
and when you add FULLSCREEN_DESKTOP into the mix, making this work right
for apps that weren’t prepared for modern systems, with no fuss, is
insanely powerful stuff.

Then there should be a function for that.? This is not that function.? As it is, the current system violates the First Law of Abstractions: any abstraction that you cannot get underneath when necessary is evil.

As I already pointed out earlier, it’s much, much easier to implement letterboxing on top of no letterboxing than it is to implement not-letterboxing on top of forced letterboxing.? This alone should prove to any reasonable programmer that this is implemented wrong.? As-is, the design essentially says “there is no valid non-letterboxing use case for this functionality,” which is just flat-out wrong.

It might not be specifically what you envisioned, but it’s one of the
best new things in SDL2.
Not if it’s broken for its intended use case, it’s not.On Saturday, November 9, 2013 1:45 PM, Ryan C. Gordon wrote:

whoops gmail app sent this to a personal email rather than the list---------- Forwarded message ----------
From: @Joshua_Brown (Joshua Brown)
Date: Nov 9, 2013 4:36 PM
Subject: Re: [SDL] Stretched SDL Fullscreen (FULLSCREEN_DESKTOP)
To: “Mason Wheeler”
Cc:

It might not appeal to a minimalist, but here’s how I’ve been doing it.

I’ve got my sprites in tile sets. So I have a class where you select which
tile and position and transformation. The class uses SDL_RenderCopyEx. I’ve
got a graphics engine class that makes sdl calls including initializing
sdl. So I tell it the window resolution and virtual resolution. It divides
the window res by the virtual one so get the scaling factor and
automatically apply it to position and scaling. So I can have my 16x16
sprite be at 120,112 on a 256x240 “screen” on any window resolution and it
will be in the middle.

2013/11/9, Ryan C. Gordon :

If the behavior was intended by the person who implemented the API in
its current form, that person did not understand the API.

I understand that you don’t like how the API evolved from your original
intention, but the thing that makes that function awesome is not that
you can scale drawing operations with it, but that you can call one
function and magically your old game works well on modern hardware: a
320x240 DOS game doesn’t have to run in a window that looks like a
postage stamp on a modern display.

Standard monitors have changed from a 4:3 aspect ratio in modern times,
and when you add FULLSCREEN_DESKTOP into the mix, making this work right
for apps that weren’t prepared for modern systems, with no fuss, is
insanely powerful stuff.

It might not be specifically what you envisioned, but it’s one of the
best new things in SDL2.

Huh, that sounds more like it should belong as part of
SDL_WINDOW_FULLSCREEN_DESKTOP itself (especially since it already does
scaling on its own anyway, may as well do the letterboxing in that
stage).

It doesn’t help that the name SDL_RenderSetLogicalSize sounds like it
will remap the resolution to the chosen one no matter what, leading to
all these confusions. Even worse, it’s perfectly possible to call this
several times in a single frame, allowing for multiple logical
resolutions - what happens if you mix logical resolutions with
different aspect ratios?

Oh, also: it’s perfectly possible for somebody to want a not 1:1 pixel
proportion, especially if it’s something emulating old systems (which
more often than not had rectangular pixels instead of square ones,
often in order to save memory). SDL_RenderSetLogicalSize would be
ideal for that except you’d need to get rid of letterboxing. The end
result is that you’ll have to use a combination of that and
SDL_RenderSetScale to work around it.

Actually even that doesn’t account for other issues… it’s a lot
harder than it sounds -_-’

Huh, that sounds more like it should belong as part of
SDL_WINDOW_FULLSCREEN_DESKTOP itself (especially since it already does
scaling on its own anyway, may as well do the letterboxing in that
stage).

Yes, exactly.? As far as I can see, Fullscreen is actually the only legitimate use case for letterboxing, while it is certainly not the only legitimate use case for logical sizes.

It doesn’t help that the name SDL_RenderSetLogicalSize sounds like it
will remap the resolution to the chosen one no matter what, leading to
all these confusions.

That’s because that’s what it was designed to do. :)On Saturday, November 9, 2013 3:35 PM, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

All of this is moot, as the functionality has shipped as-is in 2.0 and
there are games depending on it. If you’re frustrated with the way it
behaves, that’s fine, and as discussed previously you’re welcome to make a
hint to disable letterboxing or create a separate function for what you
want.On Sat, Nov 9, 2013 at 3:39 PM, Mason Wheeler wrote:

On Saturday, November 9, 2013 3:35 PM, Sik the hedgehog < sik.the.hedgehog at gmail.com> wrote:

Huh, that sounds more like it should belong as part of
SDL_WINDOW_FULLSCREEN_DESKTOP itself (especially since it already does
scaling on its own anyway, may as well do the letterboxing in that
stage).

Yes, exactly. As far as I can see, Fullscreen is actually the only
legitimate use case for letterboxing, while it is certainly not the only
legitimate use case for logical sizes.

It doesn’t help that the name SDL_RenderSetLogicalSize sounds like it
will remap the resolution to the chosen one no matter what, leading to
all these confusions.

That’s because that’s what it was designed to do. :slight_smile:


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

All of this is moot, as the functionality has shipped as-is in 2.0 and
there are games depending on it. ?If you’re frustrated with the way it
behaves, that’s fine, and as discussed previously you’re welcome to make a hint to disable letterboxing or create a separate function for what
you want.

You can’t be serious.? I know the ABI is frozen, but no one ever said that functionality is as well and bug-for-bug compatibility must be maintained from now on forever.

A parable, to put this in perspective:

Once upon a time, an engineer at SDL Motors, Inc came up with a new power steering system.? He showed it to the manager, who took a look at it and said “yeah, that looks like a good idea.? I’ll make sure it ends up in the next model.”

When the next model came out, the engineer took the car for a test drive and was horrified by the steering.? He went back to the manager and said “this is not the system I designed at all, and it doesn’t even work!? What have you done?!?? The wheels won’t turn to the right!”

“I improved on your design,” the manager said.? “It makes closed-loop driving much, much simpler.”

“But you broke the basic steering.? The wheels won’t turn to the right!” he repeated.

“Our NASCAR customers love it!” the manager replied.? “What’s the problem?”

Moral of the story: I don’t care about the NASCAR use case if basic functionality does not work.? One ridiculously specific edge case should not and can not be allowed to take priority over general functionality.? I don’t care about software that depends on a bug, especially in a brand-new system that doesn’t have all that much software built against it yet.? That’s the perfect time to fix it, before it gets a lot of inertia and becomes painful!

If someone built against a version of SDL with the broken API, then if they ever update to a newer SDL build, they’ll have to fix it.? (And if they don’t, they won’t have any problems.)? It’s not like the difference won’t show up right away in testing.? Everyone (except for Ryan) who is looking at this is saying it’s working wrong, and that’s because it is.? It needs to be fixed.? It does not need to have excuses made for not fixing it.

MasonOn Saturday, November 9, 2013 4:40 PM, Sam Lantinga wrote: