hooklib: Add D3D11 and DXGI graphics hooks

IDZ only supports D3D11 and Ongeki/Unity uses D3D11 by default.

This also includes a window hook and fullscreen fix for problematic
games (I am looking at you IDZ).
This commit is contained in:
2021-10-25 09:16:14 +00:00
committed by Hay1tsme
parent 6576af5a86
commit b6f1ca6437
23 changed files with 675 additions and 86 deletions

View File

@ -9,6 +9,7 @@
#include "hooklib/config.h"
#include "hooklib/dvd.h"
#include "hooklib/gfx/gfx.h"
#include "idzhook/config.h"
#include "idzhook/idz-dll.h"
@ -42,9 +43,10 @@ void idz_hook_config_load(
platform_config_load(&cfg->platform, filename);
amex_config_load(&cfg->amex, filename);
aime_config_load(&cfg->aime, filename);
dvd_config_load(&cfg->dvd, filename);
gfx_config_load(&cfg->gfx, filename);
idz_dll_config_load(&cfg->dll, filename);
zinput_config_load(&cfg->zinput, filename);
dvd_config_load(&cfg->dvd, filename);
}
void zinput_config_load(struct zinput_config *cfg, const wchar_t *filename)

View File

@ -8,6 +8,7 @@
#include "board/sg-reader.h"
#include "hooklib/dvd.h"
#include "hooklib/gfx/gfx.h"
#include "idzhook/idz-dll.h"
#include "idzhook/zinput.h"
@ -19,6 +20,7 @@ struct idz_hook_config {
struct amex_config amex;
struct aime_config aime;
struct dvd_config dvd;
struct gfx_config gfx;
struct idz_dll_config dll;
struct zinput_config zinput;
};

View File

@ -9,6 +9,9 @@
#include "hook/process.h"
#include "hooklib/dvd.h"
#include "hooklib/gfx/d3d11.h"
#include "hooklib/gfx/dxgi.h"
#include "hooklib/gfx/gfx.h"
#include "hooklib/serial.h"
#include "hooklib/spike.h"
@ -38,6 +41,9 @@ static DWORD CALLBACK idz_pre_startup(void)
/* Hook Win32 APIs */
serial_hook_init();
gfx_hook_init(&idz_hook_cfg.gfx, idz_hook_mod);
gfx_d3d11_hook_init(&idz_hook_cfg.gfx, idz_hook_mod);
gfx_dxgi_hook_init(&idz_hook_cfg.gfx, idz_hook_mod);
zinput_hook_init(&idz_hook_cfg.zinput);
dvd_hook_init(&idz_hook_cfg.dvd, idz_hook_mod);

View File

@ -1,6 +1,11 @@
LIBRARY idzhook
EXPORTS
CreateDXGIFactory
CreateDXGIFactory1
CreateDXGIFactory2
D3D11CreateDevice
D3D11CreateDeviceAndSwapChain
aime_io_get_api_version
aime_io_init
aime_io_led_set_color