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

Detect available screen resolution in fullscreen mode #882

Open
evertvorster opened this issue Sep 25, 2024 · 4 comments
Open

Detect available screen resolution in fullscreen mode #882

evertvorster opened this issue Sep 25, 2024 · 4 comments

Comments

@evertvorster
Copy link
Contributor

There is a lot of complexity involved in the screen setup, and this may be a hangover from ye olden days.

What is really needed is in the vsettings app is a screen detection routine.
It should detect the number of screens and the resolution of those screens.

This assumes that you want to be playing full screen and at the native resolution of the selected screen.
This is almost always the case.

However, if you want to be playing in windowed mode, then some common resolutions should be listed.

@royfalk
Copy link
Contributor

royfalk commented Sep 25, 2024

This is definitely not the case with modern games. Most games can't run in 4k with a decent framerate.

Vegastrike is an outlier here as it doesn't really use modern GPUs and CPUs properly and so can run in 4k with no problem.

However, I can see us using more resources in a year or two and having to revert this. From a programming standpoint, something like take the native resolution probably isn't a significant effort.

I'd like to see some discussion/polling on this before committing. Maybe on gitter?

@evertvorster
Copy link
Contributor Author

I beg to differ. My computer can run DOOM in 4K at ultra mode and still gives me 100+ fps.
It's a bit of a beast, though. In the future more powerful machines will be made, and they will have no issues to run games in these high resolutions. At least that is my opinion based on the current trajectory of hardware development.

While we are discussing other games, on the first run most games give you a list of resolutions you can pick from, and this is usually picked up from what is available to the system. Once you select that resolution, if it is lower than the native resolution, it scales it to the native resolution of the monitor.

My understanding on how this is achieved is that when the game launches, it first reads the available screen resolutions with SDL.
Then it checks to see if the screen resolution that was saved in the previous run of the game is available.
If it is, it launches the game.

If the saved resolution is not available, then it picks a resolution from the available list, and uses that. There is some inconsistency between what other games do here. Some pick the closest lower resolution available as compared from the last run, some pick the lowest resolution supported by the game.
My opinion, the former is superior.
Either way, with the modified resolution it launches the game.

In short, reading the available resolutions from SDL is something that will be useful no matter what is used in the future, and makes the game instantly more accessible.

@royfalk
Copy link
Contributor

royfalk commented Sep 25, 2024

OK. See if you can find a reference in SDL as well as a discussion or code snippet to implement this. If you can find it, I'll implement this.

@BenjamenMeyer if Evert can figure out some ref code in SDL, are you OK with dropping the resolution picker and settings? Also for #884. I will keep support for manual resolution and window as it's very useful for developers.

@BenjamenMeyer
Copy link
Member

Yes, I'd like to see something in the VS Settings App - there's something minimal in there now; but we should be able to query and select. Same for monitors.

@royfalk royfalk mentioned this issue Nov 22, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants