From 6d933eb8f45dae881eabbb15335612e93ca7d533 Mon Sep 17 00:00:00 2001 From: Tau Date: Wed, 15 May 2019 20:08:35 -0400 Subject: [PATCH] amex/config.c: Rename from cfg.c Easier to type and more consistent with its identifiers. --- amex/amex.h | 2 +- amex/{cfg.c => config.c} | 2 +- amex/{cfg.h => config.h} | 0 amex/ds.c | 1 + amex/ds.h | 2 +- amex/eeprom.c | 2 +- amex/eeprom.h | 2 +- amex/gpio.c | 1 + amex/gpio.h | 2 +- amex/jvs.c | 1 + amex/jvs.h | 2 +- amex/meson.build | 4 ++-- amex/sram.c | 1 + amex/sram.h | 2 +- chunihook/dllmain.c | 2 +- divahook/dllmain.c | 2 +- idzhook/dllmain.c | 7 ++++++- minihook/dllmain.c | 2 +- 18 files changed, 23 insertions(+), 14 deletions(-) rename amex/{cfg.c => config.c} (98%) rename amex/{cfg.h => config.h} (100%) diff --git a/amex/amex.h b/amex/amex.h index 85dca7e..ce6c1d5 100644 --- a/amex/amex.h +++ b/amex/amex.h @@ -2,6 +2,6 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" HRESULT amex_hook_init(const struct amex_config *cfg); diff --git a/amex/cfg.c b/amex/config.c similarity index 98% rename from amex/cfg.c rename to amex/config.c index bc8bb2d..9d10939 100644 --- a/amex/cfg.c +++ b/amex/config.c @@ -6,7 +6,7 @@ #include #include -#include "amex/cfg.h" +#include "amex/config.h" void ds_config_load(struct ds_config *cfg, const wchar_t *filename) { diff --git a/amex/cfg.h b/amex/config.h similarity index 100% rename from amex/cfg.h rename to amex/config.h diff --git a/amex/ds.c b/amex/ds.c index 7553fa7..59c6254 100644 --- a/amex/ds.c +++ b/amex/ds.c @@ -7,6 +7,7 @@ #include #include +#include "amex/config.h" #include "amex/ds.h" #include "amex/nvram.h" diff --git a/amex/ds.h b/amex/ds.h index 33dd232..7721ffe 100644 --- a/amex/ds.h +++ b/amex/ds.h @@ -2,7 +2,7 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" DEFINE_GUID( ds_guid, diff --git a/amex/eeprom.c b/amex/eeprom.c index 69849b3..4c1d1d5 100644 --- a/amex/eeprom.c +++ b/amex/eeprom.c @@ -10,7 +10,7 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" #include "amex/eeprom.h" #include "amex/nvram.h" diff --git a/amex/eeprom.h b/amex/eeprom.h index 385ed7b..a68dddb 100644 --- a/amex/eeprom.h +++ b/amex/eeprom.h @@ -2,7 +2,7 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" DEFINE_GUID( eeprom_guid, diff --git a/amex/gpio.c b/amex/gpio.c index 182b3ee..6f5c4da 100644 --- a/amex/gpio.c +++ b/amex/gpio.c @@ -4,6 +4,7 @@ #include #include +#include "amex/config.h" #include "amex/gpio.h" #include "hook/iohook.h" diff --git a/amex/gpio.h b/amex/gpio.h index d108262..b6b5503 100644 --- a/amex/gpio.h +++ b/amex/gpio.h @@ -2,7 +2,7 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" DEFINE_GUID( gpio_guid, diff --git a/amex/jvs.c b/amex/jvs.c index ad181b9..73f643f 100644 --- a/amex/jvs.c +++ b/amex/jvs.c @@ -8,6 +8,7 @@ #include #include +#include "amex/config.h" #include "amex/jvs.h" #include "hook/iobuf.h" diff --git a/amex/jvs.h b/amex/jvs.h index 0985e74..281163f 100644 --- a/amex/jvs.h +++ b/amex/jvs.h @@ -2,7 +2,7 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" #include "jvs/jvs-bus.h" diff --git a/amex/meson.build b/amex/meson.build index e5dc860..0f4d61e 100644 --- a/amex/meson.build +++ b/amex/meson.build @@ -9,8 +9,8 @@ amex_lib = static_library( sources : [ 'amex.c', 'amex.h', - 'cfg.c', - 'cfg.h', + 'config.c', + 'config.h', 'ds.c', 'ds.h', 'eeprom.c', diff --git a/amex/sram.c b/amex/sram.c index 0de2806..790588b 100644 --- a/amex/sram.c +++ b/amex/sram.c @@ -10,6 +10,7 @@ #include +#include "amex/config.h" #include "amex/sram.h" #include "amex/nvram.h" diff --git a/amex/sram.h b/amex/sram.h index f2763d2..0a93aa3 100644 --- a/amex/sram.h +++ b/amex/sram.h @@ -2,7 +2,7 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" DEFINE_GUID( sram_guid, diff --git a/chunihook/dllmain.c b/chunihook/dllmain.c index b59e4e0..ad27475 100644 --- a/chunihook/dllmain.c +++ b/chunihook/dllmain.c @@ -4,7 +4,7 @@ #include #include "amex/amex.h" -#include "amex/cfg.h" +#include "amex/config.h" #include "chunihook/jvs.h" #include "chunihook/slider.h" diff --git a/divahook/dllmain.c b/divahook/dllmain.c index c03942d..f725be2 100644 --- a/divahook/dllmain.c +++ b/divahook/dllmain.c @@ -4,7 +4,7 @@ #include #include "amex/amex.h" -#include "amex/cfg.h" +#include "amex/config.h" #include "board/sg-reader.h" diff --git a/idzhook/dllmain.c b/idzhook/dllmain.c index d6aa45e..9db8c51 100644 --- a/idzhook/dllmain.c +++ b/idzhook/dllmain.c @@ -4,7 +4,7 @@ #include #include "amex/amex.h" -#include "amex/cfg.h" +#include "amex/config.h" #include "board/sg-reader.h" @@ -17,11 +17,13 @@ #include "idzhook/jvs.h" +#include "platform/amvideo.h" #include "platform/hwmon.h" #include "platform/nusec.h" #include "util/dprintf.h" +static HMODULE idz_hook_mod; static process_entry_t idz_startup; static DWORD CALLBACK idz_pre_startup(void) @@ -37,6 +39,7 @@ static DWORD CALLBACK idz_pre_startup(void) /* Initialize platform API emulation */ + amvideo_hook_init(idz_hook_mod); hwmon_hook_init(); nusec_hook_init(); @@ -72,6 +75,8 @@ BOOL WINAPI DllMain(HMODULE mod, DWORD cause, void *ctx) return TRUE; } + idz_hook_mod = mod; + hr = process_hijack_startup(idz_pre_startup, &idz_startup); if (!SUCCEEDED(hr)) { diff --git a/minihook/dllmain.c b/minihook/dllmain.c index 40f9471..3505bc9 100644 --- a/minihook/dllmain.c +++ b/minihook/dllmain.c @@ -1,6 +1,6 @@ #include -#include "amex/cfg.h" +#include "amex/config.h" #include "amex/ds.h" #include "hook/process.h"