Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for setting display window size independently of hardware resolution #205

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 1.2.11
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2006-08-15 01:18:56 +0000, Mike B wrote:

This is not a bug, but a request for a new feature, based on mail threads here http://www.libsdl.org/pipermail/sdl/2006-August/075802.html and here http://www.libsdl.org/pipermail/sdl/2006-August/075863.html.

It would be useful to have a way to set the display window size independently of the physical hardware display resolution. I.e. an API function something like this:

SDL_Surface *SDL_SetVideoModeCustom(int physicalScreenWidth, int physicalScreenHeight, int displayWidth, int displayHeight, int bpp, Uint32 flags);

This would use displayWidth and displayHeight for the dimensions of a
display window, to be centered on a fullscreen hardware resolution of
physicalScreenWidth by physicalScreenHeight.

Access to physicalScreen(Width|Height) through environment variables could also be useful to the end user.

There are at least 2 use cases:
(1) To maintain the correct pixel aspect ratio for widescreen or tall LCD's, e.g. to always use the LCD's native resolution.
(2) To make the display window smaller for massive displays at normal desktop viewing distances, e.g. for fast action games where it could be hard to see all parts of a massive display at once.

While there may be workarounds for these use cases, mouse-cursor handling becomes very kludgy---it would be very nice to take advantage of SDL's automatic constraining of the mouse cursor position to stay within the display window in these cases.

On 2006-09-24 11:58:45 +0000, Sam Lantinga wrote:

This is already available in the SDL 1.3 API, where the concept of window size and resolution size are split.

@SDLBugzilla SDLBugzilla added enhancement New feature or request wontfix This will not be worked on labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant