1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

experimental WinBolo support

This commit is contained in:
FunkyFr3sh 2024-03-17 22:23:39 +01:00
parent 0af9bbb88f
commit ab88cb0bc4

View File

@ -931,15 +931,17 @@ HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFl
AdjustWindowRectEx(&dst, style, GetMenu(g_ddraw->hwnd) != NULL, exstyle); AdjustWindowRectEx(&dst, style, GetMenu(g_ddraw->hwnd) != NULL, exstyle);
real_SetWindowPos( if (!(dwFlags & 8))
g_ddraw->hwnd, {
HWND_NOTOPMOST, real_SetWindowPos(
dst.left, g_ddraw->hwnd,
dst.top, HWND_NOTOPMOST,
(dst.right - dst.left), dst.left,
(dst.bottom - dst.top), dst.top,
SWP_SHOWWINDOW | SWP_FRAMECHANGED); (dst.right - dst.left),
(dst.bottom - dst.top),
SWP_SHOWWINDOW | SWP_FRAMECHANGED);
}
BOOL d3d9_active = FALSE; BOOL d3d9_active = FALSE;
@ -1103,7 +1105,12 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
if (hwnd == NULL) if (hwnd == NULL)
{ {
return DD_OK; if (dwFlags & DDSCL_NORMAL)
{
hwnd = *(HWND*)0x46B4D8;
}
else
return DD_OK;
} }
if (g_ddraw->hwnd == NULL) if (g_ddraw->hwnd == NULL)
@ -1215,6 +1222,13 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
{ {
dd_SetDisplayMode(640, 480, 16, 0); dd_SetDisplayMode(640, 480, 16, 0);
} }
else
{
g_config.devmode = TRUE;
g_config.fullscreen = FALSE;
g_config.windowed = TRUE;
dd_SetDisplayMode(513, 319, 32, 8);
}
} }
return DD_OK; return DD_OK;