forked from TeamTofuShop/segatools
Simplify DLL hook mechanism
This change deletes the GetProcAddress hook and exports symbols corresponding to the hooked functions from each hook DLL instead; we stop at redirecting LoadLibrary/GetModuleHandle calls to the hook DLL. This simplified approach has less hidden magic going on behind the scenes and is more readily composable (i.e. a hook DLL can export redirect symbols for more than one dynamically-loaded DLL).
This commit is contained in:
@ -35,7 +35,7 @@ static DWORD CALLBACK mu3_pre_startup(void)
|
||||
|
||||
/* Hook Win32 APIs */
|
||||
|
||||
gfx_hook_init(&mu3_hook_cfg.gfx);
|
||||
gfx_hook_init(&mu3_hook_cfg.gfx, mu3_hook_mod);
|
||||
serial_hook_init();
|
||||
|
||||
/* Initialize emulation hooks */
|
||||
|
@ -1 +1,8 @@
|
||||
LIBRARY mu3hook
|
||||
|
||||
EXPORTS
|
||||
Direct3DCreate9
|
||||
amDllVideoClose @2
|
||||
amDllVideoGetVBiosVersion @4
|
||||
amDllVideoOpen @1
|
||||
amDllVideoSetResolution @3
|
||||
|
Reference in New Issue
Block a user