forked from Dniel97/segatools
chunihook: Explicitly load dbghelp.dll so path hooks apply to it
- This allows AMLib (in Chunithm and other games) to successfully initialize without requiring the game to be run as Administrator on first boot to create `C:\Users\AppUser\temp`.
This commit is contained in:
parent
2432b32338
commit
d2996c5271
@ -30,6 +30,7 @@ static struct chuni_hook_config chuni_hook_cfg;
|
|||||||
static DWORD CALLBACK chuni_pre_startup(void)
|
static DWORD CALLBACK chuni_pre_startup(void)
|
||||||
{
|
{
|
||||||
HMODULE d3dc;
|
HMODULE d3dc;
|
||||||
|
HMODULE dbghelp;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
dprintf("--- Begin chuni_pre_startup ---\n");
|
dprintf("--- Begin chuni_pre_startup ---\n");
|
||||||
@ -44,6 +45,16 @@ static DWORD CALLBACK chuni_pre_startup(void)
|
|||||||
dprintf("Failed to load shader compiler!\n");
|
dprintf("Failed to load shader compiler!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Pin dbghelp so the path hooks apply to it. */
|
||||||
|
|
||||||
|
dbghelp = LoadLibraryW(L"dbghelp.dll");
|
||||||
|
|
||||||
|
if (dbghelp != NULL) {
|
||||||
|
dprintf("Pinned debug helper library, hMod=%p\n", dbghelp);
|
||||||
|
} else {
|
||||||
|
dprintf("Failed to load debug helper library!\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Config load */
|
/* Config load */
|
||||||
|
|
||||||
chuni_hook_config_load(&chuni_hook_cfg, L".\\segatools.ini");
|
chuni_hook_config_load(&chuni_hook_cfg, L".\\segatools.ini");
|
||||||
|
Loading…
Reference in New Issue
Block a user