mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
fix windowed mode in some games
This commit is contained in:
parent
087cfcc9fd
commit
13df4b3cac
@ -1641,7 +1641,19 @@ HRESULT WINAPI fake_CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return real_CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
/* These dlls must be hooked for cutscene uscaling and windowed mode */
|
||||||
|
HMODULE quartz_dll = GetModuleHandleA("quartz");
|
||||||
|
HMODULE msvfw32_dll = GetModuleHandleA("msvfw32");
|
||||||
|
|
||||||
|
HRESULT result = real_CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
||||||
|
|
||||||
|
if ((!quartz_dll && GetModuleHandleA("quartz")) ||
|
||||||
|
(!msvfw32_dll && GetModuleHandleA("msvfw32")))
|
||||||
|
{
|
||||||
|
hook_init(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI fake_SetUnhandledExceptionFilter(
|
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI fake_SetUnhandledExceptionFilter(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user