forked from Hay1tsme/segatools
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
c037dd73e4
commit
776cf50bd0
@ -35,14 +35,13 @@ static DWORD CALLBACK mu3_pre_startup(void)
|
|||||||
|
|
||||||
gfx_hook_init(&mu3_hook_cfg.gfx);
|
gfx_hook_init(&mu3_hook_cfg.gfx);
|
||||||
serial_hook_init();
|
serial_hook_init();
|
||||||
unity_hook_init();
|
|
||||||
|
|
||||||
/* Initialize emulation hooks */
|
/* Initialize emulation hooks */
|
||||||
|
|
||||||
hr = platform_hook_init(
|
hr = platform_hook_init(
|
||||||
&mu3_hook_cfg.platform,
|
&mu3_hook_cfg.platform,
|
||||||
"SDDT",
|
"SDDT",
|
||||||
"AAV2",
|
"ACA1",
|
||||||
mu3_hook_mod);
|
mu3_hook_mod);
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
@ -67,6 +66,13 @@ static DWORD CALLBACK mu3_pre_startup(void)
|
|||||||
return hr;
|
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 */
|
/* Initialize debug helpers */
|
||||||
|
|
||||||
spike_hook_init(L".\\segatools.ini");
|
spike_hook_init(L".\\segatools.ini");
|
||||||
|
Loading…
Reference in New Issue
Block a user