mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2024-11-24 09:30:09 +01:00
mu3hook/dllmain.c: fix hook initialization order to fix path hook
- If the Unity `LoadLibraryW` hook is done too early, then it somehow interferes with the other DLL and hook table IAT hooks. Workaround this by moving the Unity `LoadLibraryW` hook initialization after all other hooks are done. - Also, correct the platform ID to the ALLS HX
This commit is contained in:
parent
8607faea7f
commit
c7a4c66419
@ -35,14 +35,13 @@ static DWORD CALLBACK mu3_pre_startup(void)
|
||||
|
||||
gfx_hook_init(&mu3_hook_cfg.gfx);
|
||||
serial_hook_init();
|
||||
unity_hook_init();
|
||||
|
||||
/* Initialize emulation hooks */
|
||||
|
||||
hr = platform_hook_init(
|
||||
&mu3_hook_cfg.platform,
|
||||
"SDDT",
|
||||
"AAV2",
|
||||
"ACA1",
|
||||
mu3_hook_mod);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
@ -67,6 +66,13 @@ static DWORD CALLBACK mu3_pre_startup(void)
|
||||
return hr;
|
||||
}
|
||||
|
||||
/* Initialize Unity native plugin DLL hooks
|
||||
|
||||
There seems to be an issue with other DLL hooks if `LoadLibraryW` is
|
||||
hooked earlier in the `mu3hook` initialization. */
|
||||
|
||||
unity_hook_init();
|
||||
|
||||
/* Initialize debug helpers */
|
||||
|
||||
spike_hook_init(L".\\segatools.ini");
|
||||
|
Loading…
Reference in New Issue
Block a user