add experimental aspect_ratio setting (hidden for now)

This commit is contained in:
FunkyFr3sh 2024-08-15 10:16:20 +02:00
parent e23a0ce1d5
commit c7e4b81ad7
5 changed files with 59 additions and 8 deletions

View file

@ -622,9 +622,23 @@ void util_toggle_maximize()
int w = dst_rc.right - dst_rc.left;
int h = dst_rc.bottom - dst_rc.top;
double dst_ar = (double)g_ddraw.height / g_ddraw.width;
double dst_ar;
double src_ar = (double)h / w;
if (g_config.aspect_ratio[0])
{
char* e = &g_config.aspect_ratio[0];
DWORD cx = strtoul(e, &e, 0);
DWORD cy = strtoul(e + 1, &e, 0);
dst_ar = (double)cy / cx;
}
else
{
dst_ar = (double)g_ddraw.height / g_ddraw.width;
}
dst_rc.top = 0;
dst_rc.left = 0;
dst_rc.right = w;