mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
#306 partial support for road rash upscaling
This commit is contained in:
parent
ed5176942f
commit
a2ef373871
@ -908,7 +908,6 @@ static void cfg_create_ini()
|
|||||||
"; ROAD RASH\n"
|
"; ROAD RASH\n"
|
||||||
"[RoadRash]\n"
|
"[RoadRash]\n"
|
||||||
"adjmouse=true\n"
|
"adjmouse=true\n"
|
||||||
"fixchilds=1\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"; Sim Copter\n"
|
"; Sim Copter\n"
|
||||||
"[SimCopter]\n"
|
"[SimCopter]\n"
|
||||||
|
25
src/utils.c
25
src/utils.c
@ -562,34 +562,35 @@ BOOL CALLBACK util_enum_child_proc(HWND hwnd, LPARAM lparam)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
TRACE(
|
TRACE(
|
||||||
" util_enum_child_proc right=%u, bottom=%u, left=%d, top=%d\n",
|
" util_enum_child_proc width=%u, Height=%u, left=%d, top=%d\n",
|
||||||
size.right,
|
size.right,
|
||||||
size.bottom,
|
size.bottom,
|
||||||
pos.left,
|
pos.left,
|
||||||
pos.top);
|
pos.top);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char class_name[MAX_PATH] = { 0 };
|
char class_name[MAX_PATH] = { 0 };
|
||||||
GetClassNameA(hwnd, class_name, sizeof(class_name) - 1);
|
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, "VideoRenderer") == 0 ||
|
||||||
strcmp(class_name, "MCIAVI") == 0 ||
|
strcmp(class_name, "MCIAVI") == 0 ||
|
||||||
strcmp(class_name, "AVIWnd32") == 0 ||
|
strcmp(class_name, "AVIWnd32") == 0 ||
|
||||||
strcmp(class_name, "MCIWndClass") == 0)
|
strcmp(class_name, "MCIWndClass") == 0)
|
||||||
{
|
{
|
||||||
if (g_config.fixchilds != FIX_CHILDS_DETECT_HIDE)
|
if (g_config.fixchilds != FIX_CHILDS_DETECT_HIDE)
|
||||||
{
|
{
|
||||||
InterlockedExchangePointer((void*)&g_ddraw.video_window_hwnd, hwnd);
|
InterlockedExchangePointer((void*)&g_ddraw.video_window_hwnd, hwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG style = real_GetWindowLongA(hwnd, GWL_EXSTYLE);
|
if (!(exstyle & WS_EX_TRANSPARENT))
|
||||||
|
|
||||||
if (!(style & WS_EX_TRANSPARENT))
|
|
||||||
{
|
{
|
||||||
real_SetWindowLongA(hwnd, GWL_EXSTYLE, style | WS_EX_TRANSPARENT);
|
real_SetWindowLongA(hwnd, GWL_EXSTYLE, exstyle | WS_EX_TRANSPARENT);
|
||||||
|
|
||||||
real_SetWindowPos(
|
real_SetWindowPos(
|
||||||
hwnd,
|
hwnd,
|
||||||
@ -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;
|
g_ddraw.got_child_windows = g_ddraw.child_window_exists = TRUE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user