mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
add a new .ini setting for child window handling (currently only used for tm2)
This commit is contained in:
parent
ef03ee11c5
commit
8e54756b4a
1
inc/dd.h
1
inc/dd.h
@ -104,6 +104,7 @@ typedef struct cnc_ddraw
|
||||
BOOL sierrahack;
|
||||
BOOL dk2hack;
|
||||
BOOL nonexclusive;
|
||||
BOOL fixchildwindows;
|
||||
BOOL bnet_active;
|
||||
BOOL bnet_was_fullscreen;
|
||||
BOOL bnet_was_upscaled;
|
||||
|
@ -48,6 +48,7 @@ void cfg_load()
|
||||
g_ddraw->accurate_timers = cfg_get_bool("accuratetimers", FALSE);
|
||||
g_ddraw->resizable = cfg_get_bool("resizable", TRUE);
|
||||
g_ddraw->nonexclusive = cfg_get_bool("nonexclusive", FALSE);
|
||||
g_ddraw->fixchildwindows = cfg_get_bool("fixchildwindows", TRUE);
|
||||
g_ddraw->sierrahack = cfg_get_bool("sierrahack", FALSE); // Sierra Caesar III, Pharaoh, and Zeus hack
|
||||
g_ddraw->dk2hack = cfg_get_bool("dk2hack", FALSE); // Dungeon Keeper 2 hack
|
||||
|
||||
@ -493,6 +494,7 @@ static void cfg_create_ini()
|
||||
"nonexclusive=true\n"
|
||||
"maxgameticks=60\n"
|
||||
"handlemouse=false\n"
|
||||
"fixchildwindows=false\n"
|
||||
"\n"
|
||||
"; Caesar III\n"
|
||||
"[c3]\n"
|
||||
|
11
src/utils.c
11
src/utils.c
@ -281,13 +281,16 @@ BOOL CALLBACK util_enum_child_proc(HWND hwnd, LPARAM lparam)
|
||||
{
|
||||
g_ddraw->child_window_exists = TRUE;
|
||||
|
||||
HDC hdc = GetDC(hwnd);
|
||||
if (g_ddraw->fixchildwindows)
|
||||
{
|
||||
HDC hdc = GetDC(hwnd);
|
||||
|
||||
MapWindowPoints(HWND_DESKTOP, g_ddraw->hwnd, (LPPOINT)&pos, 2);
|
||||
MapWindowPoints(HWND_DESKTOP, g_ddraw->hwnd, (LPPOINT)&pos, 2);
|
||||
|
||||
BitBlt(hdc, 0, 0, size.right, size.bottom, this->hdc, pos.left, pos.top, SRCCOPY);
|
||||
BitBlt(hdc, 0, 0, size.right, size.bottom, this->hdc, pos.left, pos.top, SRCCOPY);
|
||||
|
||||
ReleaseDC(hwnd, hdc);
|
||||
ReleaseDC(hwnd, hdc);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user