fix automap center after aspect ratio change (#1534)

This commit is contained in:
Roman Fomin 2024-02-25 16:52:58 +07:00 committed by GitHub
parent 3239194e32
commit d7b7ed9a68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -604,11 +604,18 @@ static void AM_initScreenSize(void)
void AM_ResetScreenSize(void)
{
AM_saveScaleAndLoc();
int old_h = f_h;
AM_initScreenSize();
AM_restoreScaleAndLoc();
if (f_h != old_h)
{
// Change the scaling multipliers
scale_mtof = FixedDiv(f_w << FRACBITS, m_w);
scale_ftom = FixedDiv(FRACUNIT, scale_mtof);
}
AM_activateNewScale();
}
//