mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-30 15:54:27 +01:00
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)
|
||||
{
|
||||
HMODULE d3dc;
|
||||
HMODULE dbghelp;
|
||||
HRESULT hr;
|
||||
|
||||
dprintf("--- Begin chuni_pre_startup ---\n");
|
||||
@ -44,6 +45,16 @@ static DWORD CALLBACK chuni_pre_startup(void)
|
||||
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 */
|
||||
|
||||
chuni_hook_config_load(&chuni_hook_cfg, L".\\segatools.ini");
|
||||
|
Loading…
Reference in New Issue
Block a user