Hi all,
Trying to get some in-game resolution settings for my game up and running. In lieu of the resolution dialog on start-up, I want to give the user two options in-game: Fullscreen and windowed. I want fullscreen to use the native resolution of the screen they are on (currently working fine), and I want windowed to go a step down (i.e. I don’t want windowed full-screen, or if I do, I want that as a separate option).
I currently support only 16:9, so the resolution options are of those. For example, on my PC I get 1320, 1600, 1920, etc. Native for me is 1920, fullscreen. And i’d ideally liked to make the “toggle fullscreen” option go to windowed mode 1600x900.
Question is, I’m unsure how to do this? The Screen.resolutions array seems to list every possible resolution for the current display, not just the “supported” resolutions for the game (like what is displayed in the resolution dialog). My idea was to just go a “step down” from there, but the problem is there are many “in-between” resolutions that don’t work (like 1680, or different Hz values of 1920). Is there an easy way to get the “step down” resolution for a game? It’s basically a combination of available resolutions vs supported ones.
Any help would be appreciated.
Thanks.