fix aspect ratio issues

This commit is contained in:
FunkyFr3sh 2023-12-31 04:16:45 +01:00
parent 2cbf45cc2f
commit a863d8cb33
3 changed files with 11 additions and 9 deletions

View file

@ -382,11 +382,11 @@ void util_toggle_maximize()
dst_rc.top = 0;
dst_rc.left = 0;
dst_rc.right = w;
dst_rc.bottom = (LONG)roundf(((float)g_ddraw->height / g_ddraw->width) * w);
dst_rc.bottom = (LONG)(((float)g_ddraw->height / g_ddraw->width) * w);
if (dst_rc.bottom > h)
{
dst_rc.right = (LONG)roundf(((float)dst_rc.right / dst_rc.bottom) * h);
dst_rc.right = (LONG)(((float)dst_rc.right / dst_rc.bottom) * h);
dst_rc.bottom = h;
}