- change vid_allowtrueultrawide - -1 allows for any arbitrary ratio for hud aspects, 0 changed to old behavior (max 16:9), 1 changed to old behavior except at 21:9, 1 is now the default.

- `vid_allowtrueultrawide` is now placed in game-specific config, instead of global.
This commit is contained in:
Rachael Alexanderson 2021-05-02 01:19:05 -04:00
parent ff35ea9ac7
commit 153968dc7c

View file

@ -50,7 +50,7 @@ CVAR(Bool, ui_screenborder_classic_scaling, true, CVAR_ARCHIVE)
// nonsense that graphics should not be able to actually use that extra screen space. // nonsense that graphics should not be able to actually use that extra screen space.
extern bool setsizeneeded; extern bool setsizeneeded;
CUSTOM_CVAR(Bool, vid_allowtrueultrawide, true, CVAR_GLOBALCONFIG|CVAR_ARCHIVE|CVAR_NOINITCALL) CUSTOM_CVAR(Int, vid_allowtrueultrawide, 1, CVAR_ARCHIVE|CVAR_NOINITCALL)
{ {
setsizeneeded = true; setsizeneeded = true;
} }
@ -1265,8 +1265,17 @@ static void VirtualToRealCoords(F2DDrawer *drawer, double Width, double Height,
// if 21:9 AR, map to 16:9 for all callers. // if 21:9 AR, map to 16:9 for all callers.
// this allows for black bars and stops the stretching of fullscreen images // this allows for black bars and stops the stretching of fullscreen images
if ((myratio > 1.7f) && !vid_allowtrueultrawide) {
myratio = 16.0f / 9.0f; switch (vid_allowtrueultrawide)
{
case 1:
default:
myratio = MIN(64.0f / 27.0f, myratio);
break;
case 0:
myratio = MIN(16.0f / 9.0f, myratio);
case -1:
break;
} }
double right = x + w; double right = x + w;