1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

allow zooming on low resolutions as well (worms2)

This commit is contained in:
FunkyFr3sh 2024-05-08 07:17:54 +02:00
parent d97dd8e106
commit 38b553191f
2 changed files with 7 additions and 2 deletions

View File

@ -1192,7 +1192,7 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
g_ddraw.iskkndx = strcmp(g_ddraw.title, "KKND Xtreme") == 0;
g_ddraw.isworms2 = strcmp(g_ddraw.title, "worms2") == 0;
if (g_ddraw.iskkndx || g_ddraw.isworms2)
if (g_ddraw.iskkndx)
{
g_ddraw.upscale_hack_width = 640;
g_ddraw.upscale_hack_height = 480;
@ -1202,6 +1202,11 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
g_ddraw.upscale_hack_width = 640;
g_ddraw.upscale_hack_height = 400;
}
else if (g_ddraw.isworms2)
{
g_ddraw.upscale_hack_width = 80;
g_ddraw.upscale_hack_height = 60;
}
if (g_config.vhack && !g_ddraw.isredalert && !g_ddraw.iscnc1 && !g_ddraw.iskkndx && !g_ddraw.isworms2)
{

View File

@ -685,7 +685,7 @@ BOOL util_detect_low_res_screen()
}
else if (g_ddraw.isworms2)
{
if ((*pW2DS)->RenderWidth < g_ddraw.width && (*pW2DS)->RenderHeight < g_ddraw.height)
if ((*pW2DS)->RenderWidth && (*pW2DS)->RenderWidth < g_ddraw.width && (*pW2DS)->RenderHeight < g_ddraw.height)
{
if (g_ddraw.upscale_hack_width != (*pW2DS)->RenderWidth || g_ddraw.upscale_hack_height != (*pW2DS)->RenderHeight)
{