diva, fgo: added gfx, close #46

This commit is contained in:
2024-11-03 23:00:43 +01:00
parent 892eb2b859
commit 8fc24503c8
23 changed files with 274 additions and 14 deletions

View File

@ -34,6 +34,8 @@
#include "hooklib/serial.h"
#include "hooklib/spike.h"
#include "gfxhook/gfx.h"
#include "fgohook/config.h"
#include "fgohook/io4.h"
#include "fgohook/fgo-dll.h"
@ -50,9 +52,21 @@ static struct fgo_hook_config fgo_hook_cfg;
static DWORD CALLBACK fgo_pre_startup(void)
{
HRESULT hr;
HMODULE dbghelp;
dprintf("--- Begin fgo_pre_startup ---\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");
}
/* Load config */
fgo_hook_config_load(&fgo_hook_cfg, L".\\segatools.ini");
@ -60,6 +74,7 @@ static DWORD CALLBACK fgo_pre_startup(void)
/* Hook Win32 APIs */
dvd_hook_init(&fgo_hook_cfg.dvd, fgo_hook_mod);
gfx_hook_init(&fgo_hook_cfg.gfx);
touch_screen_hook_init(&fgo_hook_cfg.touch, fgo_hook_mod);
serial_hook_init();