From c929141e71fe039f777351172d7ea69dcdc79652 Mon Sep 17 00:00:00 2001 From: Will Xyen Date: Mon, 30 Aug 2021 18:49:45 -0700 Subject: [PATCH] ddrhook: move common hooks to ddrhook-util --- Module.mk | 1 + src/main/ddrhook-util/Module.mk | 13 +++++++++++++ src/main/{ddrhook => ddrhook-util}/dinput.c | 0 src/main/{ddrhook => ddrhook-util}/dinput.h | 0 src/main/{ddrhook => ddrhook-util}/gfx.c | 0 src/main/{ddrhook => ddrhook-util}/gfx.h | 0 src/main/{ddrhook => ddrhook-util}/guid.c | 2 +- src/main/{ddrhook => ddrhook-util}/misc.c | 2 +- src/main/{ddrhook => ddrhook-util}/misc.h | 0 src/main/{ddrhook => ddrhook-util}/monitor.c | 2 +- src/main/{ddrhook => ddrhook-util}/monitor.h | 0 src/main/ddrhook/Module.mk | 6 +----- src/main/ddrhook/dllmain.c | 3 ++- src/main/ddrhook/master.c | 9 +++++---- 14 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 src/main/ddrhook-util/Module.mk rename src/main/{ddrhook => ddrhook-util}/dinput.c (100%) rename src/main/{ddrhook => ddrhook-util}/dinput.h (100%) rename src/main/{ddrhook => ddrhook-util}/gfx.c (100%) rename src/main/{ddrhook => ddrhook-util}/gfx.h (100%) rename src/main/{ddrhook => ddrhook-util}/guid.c (56%) rename src/main/{ddrhook => ddrhook-util}/misc.c (99%) rename src/main/{ddrhook => ddrhook-util}/misc.h (100%) rename src/main/{ddrhook => ddrhook-util}/monitor.c (99%) rename src/main/{ddrhook => ddrhook-util}/monitor.h (100%) diff --git a/Module.mk b/Module.mk index 03bb582..028db17 100644 --- a/Module.mk +++ b/Module.mk @@ -91,6 +91,7 @@ include src/main/camhook/Module.mk include src/main/cconfig/Module.mk include src/main/config/Module.mk include src/main/d3d9exhook/Module.mk +include src/main/ddrhook-util/Module.mk include src/main/ddrhook/Module.mk include src/main/ddrio-mm/Module.mk include src/main/ddrio-smx/Module.mk diff --git a/src/main/ddrhook-util/Module.mk b/src/main/ddrhook-util/Module.mk new file mode 100644 index 0000000..e395d5c --- /dev/null +++ b/src/main/ddrhook-util/Module.mk @@ -0,0 +1,13 @@ +libs += ddrhook-util + +libs_ddrhook-util := \ + hook \ + hooklib \ + util \ + +src_ddrhook-util := \ + dinput.c \ + gfx.c \ + guid.c \ + misc.c \ + monitor.c \ diff --git a/src/main/ddrhook/dinput.c b/src/main/ddrhook-util/dinput.c similarity index 100% rename from src/main/ddrhook/dinput.c rename to src/main/ddrhook-util/dinput.c diff --git a/src/main/ddrhook/dinput.h b/src/main/ddrhook-util/dinput.h similarity index 100% rename from src/main/ddrhook/dinput.h rename to src/main/ddrhook-util/dinput.h diff --git a/src/main/ddrhook/gfx.c b/src/main/ddrhook-util/gfx.c similarity index 100% rename from src/main/ddrhook/gfx.c rename to src/main/ddrhook-util/gfx.c diff --git a/src/main/ddrhook/gfx.h b/src/main/ddrhook-util/gfx.h similarity index 100% rename from src/main/ddrhook/gfx.h rename to src/main/ddrhook-util/gfx.h diff --git a/src/main/ddrhook/guid.c b/src/main/ddrhook-util/guid.c similarity index 56% rename from src/main/ddrhook/guid.c rename to src/main/ddrhook-util/guid.c index 5ae4393..2095e6b 100644 --- a/src/main/ddrhook/guid.c +++ b/src/main/ddrhook-util/guid.c @@ -1,4 +1,4 @@ #include #include -#include "ddrhook/monitor.h" +#include "ddrhook-util/monitor.h" diff --git a/src/main/ddrhook/misc.c b/src/main/ddrhook-util/misc.c similarity index 99% rename from src/main/ddrhook/misc.c rename to src/main/ddrhook-util/misc.c index ffe50ec..4d16fd1 100644 --- a/src/main/ddrhook/misc.c +++ b/src/main/ddrhook-util/misc.c @@ -2,7 +2,7 @@ #include -#include "ddrhook/gfx.h" +#include "ddrhook-util/gfx.h" #include "hook/pe.h" #include "hook/table.h" diff --git a/src/main/ddrhook/misc.h b/src/main/ddrhook-util/misc.h similarity index 100% rename from src/main/ddrhook/misc.h rename to src/main/ddrhook-util/misc.h diff --git a/src/main/ddrhook/monitor.c b/src/main/ddrhook-util/monitor.c similarity index 99% rename from src/main/ddrhook/monitor.c rename to src/main/ddrhook-util/monitor.c index a9e0c47..0dfce07 100644 --- a/src/main/ddrhook/monitor.c +++ b/src/main/ddrhook-util/monitor.c @@ -7,7 +7,7 @@ #include #include -#include "ddrhook/monitor.h" +#include "ddrhook-util/monitor.h" #include "hook/table.h" diff --git a/src/main/ddrhook/monitor.h b/src/main/ddrhook-util/monitor.h similarity index 100% rename from src/main/ddrhook/monitor.h rename to src/main/ddrhook-util/monitor.h diff --git a/src/main/ddrhook/Module.mk b/src/main/ddrhook/Module.mk index fc51869..b44ae81 100644 --- a/src/main/ddrhook/Module.mk +++ b/src/main/ddrhook/Module.mk @@ -5,6 +5,7 @@ deplibs_ddrhook := \ libs_ddrhook := \ acioemu \ + ddrhook-util \ p3ioemu \ p3io \ hook \ @@ -17,12 +18,7 @@ src_ddrhook := \ extio.c \ dllmain.c \ _com4.c \ - dinput.c \ - gfx.c \ - guid.c \ master.c \ - misc.c \ - monitor.c \ p3io.c \ usbmem.c \ spike.c diff --git a/src/main/ddrhook/dllmain.c b/src/main/ddrhook/dllmain.c index 325dd06..c4dede5 100644 --- a/src/main/ddrhook/dllmain.c +++ b/src/main/ddrhook/dllmain.c @@ -5,9 +5,10 @@ #include "bemanitools/ddrio.h" #include "bemanitools/eamio.h" +#include "ddrhook-util/gfx.h" + #include "ddrhook/_com4.h" #include "ddrhook/extio.h" -#include "ddrhook/gfx.h" #include "ddrhook/master.h" #include "ddrhook/p3io.h" #include "ddrhook/spike.h" diff --git a/src/main/ddrhook/master.c b/src/main/ddrhook/master.c index b63bdf7..5d12210 100644 --- a/src/main/ddrhook/master.c +++ b/src/main/ddrhook/master.c @@ -1,8 +1,9 @@ #include "ddrhook/master.h" -#include "ddrhook/dinput.h" -#include "ddrhook/gfx.h" -#include "ddrhook/misc.h" -#include "ddrhook/monitor.h" + +#include "ddrhook-util/dinput.h" +#include "ddrhook-util/gfx.h" +#include "ddrhook-util/misc.h" +#include "ddrhook-util/monitor.h" #include "hook/table.h"