ekt: add gfx hook, misc: bugfixes

This commit is contained in:
Dniel97
2026-02-26 23:26:00 +01:00
parent 9c67f53902
commit 1c7531e45e
10 changed files with 38 additions and 1 deletions

View File

@@ -179,6 +179,7 @@ $(BUILD_DIR_ZIP)/mai2.zip:
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
$(BUILD_DIR_GAMES_64)/mai2hook/mai2hook.dll \
$(DIST_DIR)/mai2/segatools.ini \
$(DIST_DIR)/mai2/config_hook.json \
$(DIST_DIR)/mai2/launch.bat \
$(BUILD_DIR_ZIP)/mai2
$(V)cp pki/billing.pub \

View File

@@ -77,6 +77,12 @@ enable=1
; modding frameworks such as BepInEx.
targetAssembly=
[gfx]
; Enables the graphics hook.
enable=1
; Enable DPI awareness for the game process, preventing Windows from stretching the game window if a DPI scaling higher than 100% is used
dpiAware=1
[printer]
; G-Printec CX-7000 Printer printer emulation setting.
enable=1

View File

@@ -80,6 +80,12 @@ enable=1
; modding frameworks such as BepInEx.
targetAssembly=
[gfx]
; Enables the graphics hook.
enable=1
; Enable DPI awareness for the game process, preventing Windows from stretching the game window if a DPI scaling higher than 100% is used
dpiAware=1
; -----------------------------------------------------------------------------
; LED settings
; -----------------------------------------------------------------------------

View File

@@ -129,6 +129,10 @@ path=
; world. An improved solution will be provided later.
[io4]
; Only enables input when the game's main window is focused. Needs to be
; disabled for WACVR.
foreground=0
; Test button virtual-key code. Default is the F1 key.
test=0x70
; Service button virtual-key code. Default is the F2 key.

View File

@@ -90,7 +90,6 @@ enable=1
; Enable DPI awareness for the game process, preventing Windows from stretching the game window if a DPI scaling higher than 100% is used
dpiAware=1
[unity]
; Enable Unity hook. This will allow you to run custom .NET code before the game
enable=1

View File

@@ -3,6 +3,8 @@
#include "board/config.h"
#include "gfxhook/config.h"
#include "ekthook/config.h"
#include "ekthook/ekt-dll.h"
@@ -98,6 +100,7 @@ void ekt_hook_config_load(
platform_config_load(&cfg->platform, filename);
aime_config_load(&cfg->aime, filename);
io4_config_load(&cfg->io4, filename);
gfx_config_load(&cfg->gfx, filename);
dvd_config_load(&cfg->dvd, filename);
led15093_config_load(&cfg->led15093, filename);
y3_config_load(&cfg->y3, filename);

View File

@@ -6,6 +6,8 @@
#include "board/config.h"
#include "board/led15093.h"
#include "gfxhook/gfx.h"
#include "ekthook/ekt-dll.h"
#include "hooklib/config.h"
@@ -20,6 +22,7 @@ struct ekt_hook_config {
struct platform_config platform;
struct aime_config aime;
struct io4_config io4;
struct gfx_config gfx;
struct dvd_config dvd;
struct led15093_config led15093;
struct y3_config y3;

View File

@@ -29,6 +29,12 @@
#include "board/sg-reader.h"
#include "board/led15093.h"
#include "gfxhook/d3d9.h"
#include "gfxhook/d3d11.h"
#include "gfxhook/dxgi.h"
#include "gfxhook/gfx.h"
#include "hook/process.h"
#include "hook/iohook.h"
@@ -103,6 +109,9 @@ static DWORD CALLBACK ekt_pre_startup(void)
/* Hook Win32 APIs */
dvd_hook_init(&ekt_hook_cfg.dvd, ekt_hook_mod);
gfx_hook_init(&ekt_hook_cfg.gfx);
gfx_d3d11_hook_init(&ekt_hook_cfg.gfx, ekt_hook_mod);
gfx_dxgi_hook_init(&ekt_hook_cfg.gfx, ekt_hook_mod);
serial_hook_init();
createprocess_push_hook_w(L"fsutil", L"", L"", true, true);

View File

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

View File

@@ -11,6 +11,7 @@ shared_library(
link_with : [
aimeio_lib,
board_lib,
gfxhook_lib,
ektio_lib,
hooklib_lib,
jvs_lib,