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

@ -22,6 +22,9 @@
#include "divahook/jvs.h"
#include "divahook/slider.h"
#include "gfxhook/gfx.h"
#include "gfxhook/gl.h"
#include "hook/process.h"
#include "hooklib/serial.h"
@ -38,15 +41,30 @@ static struct diva_hook_config diva_hook_cfg;
static DWORD CALLBACK diva_pre_startup(void)
{
HRESULT hr;
HMODULE dbghelp;
dprintf("--- Begin diva_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");
}
/* Config load */
diva_hook_config_load(&diva_hook_cfg, L".\\segatools.ini");
/* Hook Win32 APIs */
dvd_hook_init(&diva_hook_cfg.dvd, diva_hook_mod);
gfx_hook_init(&diva_hook_cfg.gfx);
gfx_gl_hook_init(&diva_hook_cfg.gfx, diva_hook_mod);
serial_hook_init();
/* Initialize emulation hooks */