refactor: Entire code base, thread and log usage

Boils down to:
- Include headers
- Reduce boiler plate with helpers
- Swap out explicit usages with core API layer
  and ensure the right API is configured beforehand
This commit is contained in:
icex2
2024-02-23 13:29:53 +01:00
parent bc9b8b508e
commit 0adec478cc
338 changed files with 1307 additions and 640 deletions
+2 -1
View File
@@ -19,6 +19,8 @@
#include "bemanitools/ddrio.h"
#include "core/log.h"
#include "ddrhook-util/_com4.h"
#include "hook/iohook.h"
@@ -27,7 +29,6 @@
#include "util/defs.h"
#include "util/iobuf.h"
#include "util/log.h"
static struct ac_io_emu com4_ac_io_emu;
static struct ac_io_emu_hdxs com4_hdxs;
+2 -1
View File
@@ -5,12 +5,13 @@
#include <stdbool.h>
#include "core/log.h"
#include "hook/com-proxy.h"
#include "hook/pe.h"
#include "hook/table.h"
#include "util/defs.h"
#include "util/log.h"
static HRESULT STDCALL my_DirectInput8Create(
HINSTANCE hinst,
+2 -1
View File
@@ -14,10 +14,11 @@
#include "bemanitools/ddrio.h"
#include "core/log.h"
#include "hook/iohook.h"
#include "util/iobuf.h"
#include "util/log.h"
#include "util/str.h"
static HRESULT extio_open(struct irp *irp);
+2 -1
View File
@@ -11,13 +11,14 @@
#include <stdint.h>
#include <stdio.h>
#include "core/log.h"
#include "hook/com-proxy.h"
#include "hook/table.h"
#include "ddrhook-util/gfx.h"
#include "util/defs.h"
#include "util/log.h"
#include "util/str.h"
#include "util/time.h"
+2 -1
View File
@@ -2,13 +2,14 @@
#include <stdint.h>
#include "core/log.h"
#include "ddrhook-util/gfx.h"
#include "hook/pe.h"
#include "hook/table.h"
#include "util/defs.h"
#include "util/log.h"
#include "util/str.h"
static LRESULT(STDCALL *real_SendMessageW)(
+2 -1
View File
@@ -7,12 +7,13 @@
#include <stdbool.h>
#include <wchar.h>
#include "core/log.h"
#include "ddrhook-util/monitor.h"
#include "hook/table.h"
#include "util/defs.h"
#include "util/log.h"
#include "util/str.h"
/* Link pointers */
+2 -2
View File
@@ -7,11 +7,11 @@
#include "ddrhook-util/p3io.h"
#include "core/log.h"
#include "p3ioemu/emu.h"
#include "p3ioemu/uart.h"
#include "util/log.h"
extern bool _15khz;
extern bool standard_def;
+2 -1
View File
@@ -15,10 +15,11 @@
#include "acioemu/addr.h"
#include "acioemu/emu.h"
#include "core/log.h"
#include "hook/iohook.h"
#include "util/defs.h"
#include "util/log.h"
#include "util/str.h"
static struct ac_io_emu spike_ac_io_emu;
+2 -1
View File
@@ -12,12 +12,13 @@
#include <string.h>
#include <wchar.h>
#include "core/log.h"
#include "hook/iohook.h"
#include "util/crc.h"
#include "util/fs.h"
#include "util/iobuf.h"
#include "util/log.h"
#include "util/str.h"
#define USBMEM_DEVICE_COUNT 2