forked from Dniel97/segatools
cardhook: Fold back into chunihook
And so the cycle goes on.
This commit is contained in:
parent
fc345a46a7
commit
dfc1e13397
@ -1,54 +0,0 @@
|
|||||||
#include <windows.h>
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include "board/config.h"
|
|
||||||
#include "board/sg-reader.h"
|
|
||||||
|
|
||||||
#include "hook/process.h"
|
|
||||||
|
|
||||||
#include "hooklib/serial.h"
|
|
||||||
#include "hooklib/spike.h"
|
|
||||||
|
|
||||||
#include "platform/config.h"
|
|
||||||
#include "platform/dns.h"
|
|
||||||
|
|
||||||
#include "util/dprintf.h"
|
|
||||||
|
|
||||||
static struct aime_config app_aime_config;
|
|
||||||
static struct dns_config app_dns_config;
|
|
||||||
static process_entry_t app_startup;
|
|
||||||
|
|
||||||
static DWORD CALLBACK app_pre_startup(void)
|
|
||||||
{
|
|
||||||
dprintf("--- Begin %s ---\n", __func__);
|
|
||||||
|
|
||||||
aime_config_load(&app_aime_config, L".\\segatools.ini");
|
|
||||||
dns_config_load(&app_dns_config, L".\\segatools.ini");
|
|
||||||
spike_hook_init(L".\\segatools.ini");
|
|
||||||
|
|
||||||
serial_hook_init();
|
|
||||||
sg_reader_hook_init(&app_aime_config, 12);
|
|
||||||
dns_platform_hook_init(&app_dns_config);
|
|
||||||
|
|
||||||
dprintf("--- End %s ---\n", __func__);
|
|
||||||
|
|
||||||
return app_startup();
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HMODULE mod, DWORD cause, void *ctx)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
if (cause != DLL_PROCESS_ATTACH) {
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = process_hijack_startup(app_pre_startup, &app_startup);
|
|
||||||
|
|
||||||
if (!SUCCEEDED(hr)) {
|
|
||||||
dprintf("Failed to hijack process startup: %x\n", (int) hr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCEEDED(hr);
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
shared_library(
|
|
||||||
'cardhook',
|
|
||||||
name_prefix : '',
|
|
||||||
include_directories: inc,
|
|
||||||
implicit_include_directories : false,
|
|
||||||
c_pch : '../precompiled.h',
|
|
||||||
dependencies : [
|
|
||||||
capnhook.get_variable('hook_dep'),
|
|
||||||
capnhook.get_variable('hooklib_dep'),
|
|
||||||
],
|
|
||||||
link_with : [
|
|
||||||
aimeio_dll,
|
|
||||||
board_lib,
|
|
||||||
hooklib_lib,
|
|
||||||
platform_lib,
|
|
||||||
util_lib,
|
|
||||||
],
|
|
||||||
sources : [
|
|
||||||
'dllmain.c',
|
|
||||||
],
|
|
||||||
)
|
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#include "amex/config.h"
|
#include "amex/config.h"
|
||||||
|
|
||||||
|
#include "board/config.h"
|
||||||
|
|
||||||
#include "chunihook/config.h"
|
#include "chunihook/config.h"
|
||||||
|
|
||||||
#include "hooklib/config.h"
|
#include "hooklib/config.h"
|
||||||
@ -31,6 +33,7 @@ void chuni_hook_config_load(
|
|||||||
|
|
||||||
platform_config_load(&cfg->platform, filename);
|
platform_config_load(&cfg->platform, filename);
|
||||||
amex_config_load(&cfg->amex, filename);
|
amex_config_load(&cfg->amex, filename);
|
||||||
|
aime_config_load(&cfg->aime, filename);
|
||||||
gfx_config_load(&cfg->gfx, filename);
|
gfx_config_load(&cfg->gfx, filename);
|
||||||
slider_config_load(&cfg->slider, filename);
|
slider_config_load(&cfg->slider, filename);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include "amex/config.h"
|
#include "amex/config.h"
|
||||||
|
|
||||||
|
#include "board/config.h"
|
||||||
|
|
||||||
#include "hooklib/config.h"
|
#include "hooklib/config.h"
|
||||||
|
|
||||||
#include "platform/config.h"
|
#include "platform/config.h"
|
||||||
@ -16,6 +18,7 @@ struct slider_config {
|
|||||||
struct chuni_hook_config {
|
struct chuni_hook_config {
|
||||||
struct platform_config platform;
|
struct platform_config platform;
|
||||||
struct amex_config amex;
|
struct amex_config amex;
|
||||||
|
struct aime_config aime;
|
||||||
struct gfx_config gfx;
|
struct gfx_config gfx;
|
||||||
struct slider_config slider;
|
struct slider_config slider;
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include "amex/amex.h"
|
#include "amex/amex.h"
|
||||||
|
|
||||||
|
#include "board/sg-reader.h"
|
||||||
|
|
||||||
#include "chunihook/config.h"
|
#include "chunihook/config.h"
|
||||||
#include "chunihook/jvs.h"
|
#include "chunihook/jvs.h"
|
||||||
#include "chunihook/slider.h"
|
#include "chunihook/slider.h"
|
||||||
@ -60,6 +62,7 @@ static DWORD CALLBACK chuni_pre_startup(void)
|
|||||||
|
|
||||||
amex_hook_init(&chuni_hook_cfg.amex, chunithm_jvs_init);
|
amex_hook_init(&chuni_hook_cfg.amex, chunithm_jvs_init);
|
||||||
slider_hook_init(&chuni_hook_cfg.slider);
|
slider_hook_init(&chuni_hook_cfg.slider);
|
||||||
|
sg_reader_hook_init(&chuni_hook_cfg.aime, 12);
|
||||||
|
|
||||||
/* Initialize debug helpers */
|
/* Initialize debug helpers */
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ shared_library(
|
|||||||
capnhook.get_variable('hooklib_dep'),
|
capnhook.get_variable('hooklib_dep'),
|
||||||
],
|
],
|
||||||
link_with : [
|
link_with : [
|
||||||
|
aimeio_dll,
|
||||||
amex_lib,
|
amex_lib,
|
||||||
board_lib,
|
board_lib,
|
||||||
chuniio_dll,
|
chuniio_dll,
|
||||||
|
@ -46,7 +46,6 @@ subdir('divaio')
|
|||||||
subdir('idzio')
|
subdir('idzio')
|
||||||
subdir('mu3io')
|
subdir('mu3io')
|
||||||
|
|
||||||
subdir('cardhook')
|
|
||||||
subdir('chunihook')
|
subdir('chunihook')
|
||||||
subdir('divahook')
|
subdir('divahook')
|
||||||
subdir('idzhook')
|
subdir('idzhook')
|
||||||
|
Loading…
Reference in New Issue
Block a user