GaijinEntertainment / DagorEngine

Dagor Engine and Tools source code from Gaijin Games KFT
Other
2.18k stars 272 forks source link

Confusing line when setting window resolution #75

Open fluffyball9 opened 2 months ago

fluffyball9 commented 2 months ago

In prog/engine/drv/drv3d_commonCode/drv_utils.cpp, line 206 reads:

src_wdt = min(scr_hgt * base_scr_wdt / base_scr_hgt, base_scr_wdt);

I'm trying to understand this; if the goal is to force the aspect ratio to be the same, then why is there a comparison between the corrected scr_wdt and base_scr_wdt?

The main reason I'm asking is because this means that the window won't upscale horizontally.