mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
add another check for faulty upscaling resolution
This commit is contained in:
parent
468e350528
commit
ec99f9be03
14
src/dd.c
14
src/dd.c
@ -500,8 +500,18 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
|
|||||||
if (g_ddraw->render.width > g_ddraw->mode.dmPelsWidth ||
|
if (g_ddraw->render.width > g_ddraw->mode.dmPelsWidth ||
|
||||||
g_ddraw->render.height > g_ddraw->mode.dmPelsHeight)
|
g_ddraw->render.height > g_ddraw->mode.dmPelsHeight)
|
||||||
{
|
{
|
||||||
/* chosen game resolution higher than current resolution, use windowed mode for this case */
|
/* Try without upscaling */
|
||||||
g_ddraw->windowed = TRUE;
|
g_ddraw->render.width = g_ddraw->width;
|
||||||
|
g_ddraw->render.height = g_ddraw->height;
|
||||||
|
|
||||||
|
g_ddraw->render.mode.dmPelsWidth = g_ddraw->render.width;
|
||||||
|
g_ddraw->render.mode.dmPelsHeight = g_ddraw->render.height;
|
||||||
|
|
||||||
|
if (ChangeDisplaySettings(&g_ddraw->render.mode, CDS_TEST) != DISP_CHANGE_SUCCESSFUL)
|
||||||
|
{
|
||||||
|
/* chosen game resolution higher than current resolution, use windowed mode for this case */
|
||||||
|
g_ddraw->windowed = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user