RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.03k stars 178 forks source link

Autodetect highest resolution on first run #3168

Closed ohlidalp closed 2 months ago

ohlidalp commented 4 months ago

Looks up highest res in OGRE's available modes list, then applies.

RoR.log:

01:37:17: D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1024 x 768 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1152 x 864 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1280 x 960 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1280 x 1024 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1600 x 1024 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1600 x 1200 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1920 x 1200 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 1920 x 1440 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 2560 x 1440 @ 32-bit colour
01:37:17: D3D9 : RenderSystem Option: Video Mode = 3440 x 1440 @ 32-bit colour
01:37:17: [RoR|Startup|Rendering] WARNING - invalid 'ogre.cfg', auto-detected resolution 3440x1440

Also added a big pop-up banner to the Render Settings UI when a value is changed: obrazek

CuriousMike56 commented 4 months ago

Auto detection works great! Tested DirectX and OpenGL under Windows and Linux.

Restart banner should apply to all settings categories where applicable, also continuously changing settings expands the window:

https://github.com/user-attachments/assets/b8755e8e-7875-4803-8745-6a839d531d9a

ohlidalp commented 3 months ago

The expanding window is a hilarious glitch, easy fix.

I can't think of any other categories that need restarting, maybe sky and water but that can and ahould be fixed to not need restart, at least I know this for water.

CuriousMike56 commented 3 months ago

I can't think of any other categories that need restarting

I know shadows and input grab mode require a restart, unsure about other settings.

CuriousMike56 commented 3 months ago

Works well on Windows 👍

CuriousMike56 commented 3 months ago

Tested under Linux, seems good there also.