mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
don't override maintain aspect ratio option globally when fullscreen resolution isn't supported
This commit is contained in:
parent
14ea479797
commit
b69e89d1de
@ -472,6 +472,8 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
|
||||
This->render.mode.dmBitsPerPel = This->render.bpp;
|
||||
}
|
||||
|
||||
BOOL maintas = ddraw->maintas;
|
||||
|
||||
if(!This->windowed)
|
||||
{
|
||||
// Making sure the chosen resolution is valid
|
||||
@ -519,7 +521,7 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
|
||||
This->windowed = TRUE;
|
||||
}
|
||||
else
|
||||
This->maintas = TRUE;
|
||||
maintas = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -550,7 +552,7 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
|
||||
This->render.viewport.y = This->render.height / 2 - This->render.viewport.height / 2;
|
||||
This->render.viewport.x = This->render.width / 2 - This->render.viewport.width / 2;
|
||||
}
|
||||
else if (This->maintas)
|
||||
else if (maintas)
|
||||
{
|
||||
This->render.viewport.width = This->render.width;
|
||||
This->render.viewport.height = ((float)This->height / This->width) * This->render.viewport.width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user