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

fix movies in atrox

This commit is contained in:
FunkyFr3sh 2024-06-04 03:40:29 +02:00
parent dfeb081cab
commit 5112aa76e4
3 changed files with 33 additions and 8 deletions

View File

@ -366,7 +366,6 @@ static void cfg_create_ini()
"; Atrox\n"
"[Atrox]\n"
"nonexclusive=true\n"
"fixchilds=0\n"
"allow_wmactivate=true\n"
"\n"
"; Atomic Bomberman\n"

View File

@ -590,17 +590,25 @@ BOOL CALLBACK util_enum_child_proc(HWND hwnd, LPARAM lparam)
RECT size;
RECT pos;
if (real_GetClientRect(hwnd, &size) && real_GetWindowRect(hwnd, &pos) && size.right > 1 && size.bottom > 1)
if (real_GetClientRect(hwnd, &size) &&
real_GetWindowRect(hwnd, &pos) &&
size.right > 1 &&
size.bottom > 1)
{
char class_name[MAX_PATH] = { 0 };
GetClassNameA(hwnd, class_name, sizeof(class_name) - 1);
LONG style = real_GetWindowLongA(hwnd, GWL_STYLE);
LONG exstyle = real_GetWindowLongA(hwnd, GWL_EXSTYLE);
//TRACE("util_enum_child_proc class=%s, hwnd=%p, width=%u, height=%u, left=%d, top=%d\n",
// class_name, hwnd, size.right, size.bottom, pos.left, pos.top);
//TRACE("util_enum_child_proc class=%s, hwnd=%p, width=%u, height=%u, left=%d, top=%d, parent=%p\n",
// class_name, hwnd, size.right, size.bottom, pos.left, pos.top, GetParent(hwnd));
//dbg_dump_wnd_styles(real_GetWindowLongA(hwnd, GWL_STYLE), exstyle);
//dbg_dump_wnd_styles(style, exstyle);
/* Atrox */
if (style == 0x500100C4 && strcmp(class_name, "Edit") == 0)
return TRUE;
if (g_config.fixchilds == FIX_CHILDS_DETECT_HIDE ||
strcmp(class_name, "VideoRenderer") == 0 ||

View File

@ -834,6 +834,7 @@ BOOL WINAPI fake_StretchBlt(
(hwnd == g_ddraw.hwnd ||
(g_config.fixchilds && IsChild(g_ddraw.hwnd, hwnd) &&
(g_config.fixchilds == FIX_CHILDS_DETECT_HIDE ||
strcmp(class_name, "VideoRenderer") == 0 ||
strcmp(class_name, "AVI Window") == 0 ||
strcmp(class_name, "MCIAVI") == 0 ||
strcmp(class_name, "AVIWnd32") == 0 ||
@ -846,8 +847,22 @@ BOOL WINAPI fake_StretchBlt(
if (primary_dc)
{
POINT pt = { 0 };
real_MapWindowPoints(hwnd, g_ddraw.hwnd, &pt, 1);
BOOL result =
real_StretchBlt(primary_dc, xDest, yDest, wDest, hDest, hdcSrc, xSrc, ySrc, wSrc, hSrc, rop);
real_StretchBlt(
primary_dc,
xDest + pt.x,
yDest + pt.y,
wDest,
hDest,
hdcSrc,
xSrc,
ySrc,
wSrc,
hSrc,
rop);
dds_ReleaseDC(g_ddraw.primary, primary_dc);
@ -1053,11 +1068,14 @@ int WINAPI fake_StretchDIBits(
if (primary_dc)
{
POINT pt = {0};
real_MapWindowPoints(hwnd, g_ddraw.hwnd, &pt, 1);
int result =
real_StretchDIBits(
primary_dc,
xDest,
yDest,
xDest + pt.x,
yDest + pt.y,
DestWidth,
DestHeight,
xSrc,