Skip to content

Commit

Permalink
#306 partial support for road rash upscaling
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Apr 25, 2024
1 parent ed51769 commit a2ef373
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ static void cfg_create_ini()
"; ROAD RASH\n"
"[RoadRash]\n"
"adjmouse=true\n"
"fixchilds=1\n"
"\n"
"; Sim Copter\n"
"[SimCopter]\n"
Expand Down
25 changes: 13 additions & 12 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,34 +562,35 @@ BOOL CALLBACK util_enum_child_proc(HWND hwnd, LPARAM lparam)
{
/*
TRACE(
" util_enum_child_proc right=%u, bottom=%u, left=%d, top=%d\n",
size.right,
" util_enum_child_proc width=%u, Height=%u, left=%d, top=%d\n",
size.right,
size.bottom,
pos.left,
pos.top);
*/
*/

char class_name[MAX_PATH] = { 0 };
GetClassNameA(hwnd, class_name, sizeof(class_name) - 1);

//TRACE(" AVIWINDOW class=%s\n", class_name);
//LONG style = real_GetWindowLongA(hwnd, GWL_STYLE);
LONG exstyle = real_GetWindowLongA(hwnd, GWL_EXSTYLE);

if (g_config.fixchilds == FIX_CHILDS_DETECT_HIDE ||
//TRACE(" AVIWINDOW class=%s, style=%p, exstyle=%p\n", class_name, style, exstyle);

if (g_config.fixchilds == FIX_CHILDS_DETECT_HIDE ||
strcmp(class_name, "VideoRenderer") == 0 ||
strcmp(class_name, "MCIAVI") == 0 ||
strcmp(class_name, "AVIWnd32") == 0 ||
strcmp(class_name, "AVIWnd32") == 0 ||
strcmp(class_name, "MCIWndClass") == 0)
{
if (g_config.fixchilds != FIX_CHILDS_DETECT_HIDE)
{
InterlockedExchangePointer((void*)&g_ddraw.video_window_hwnd, hwnd);
}

LONG style = real_GetWindowLongA(hwnd, GWL_EXSTYLE);
}

if (!(style & WS_EX_TRANSPARENT))
if (!(exstyle & WS_EX_TRANSPARENT))
{
real_SetWindowLongA(hwnd, GWL_EXSTYLE, style | WS_EX_TRANSPARENT);
real_SetWindowLongA(hwnd, GWL_EXSTYLE, exstyle | WS_EX_TRANSPARENT);

real_SetWindowPos(
hwnd,
Expand All @@ -602,7 +603,7 @@ BOOL CALLBACK util_enum_child_proc(HWND hwnd, LPARAM lparam)
);
}
}
else
else if (!(exstyle & WS_EX_TRANSPARENT))
{
g_ddraw.got_child_windows = g_ddraw.child_window_exists = TRUE;

Expand Down

0 comments on commit a2ef373

Please sign in to comment.