1
0
mirror of https://gitea.tendokyu.moe/Dniel97/segatools.git synced 2024-11-27 22:40:48 +01:00

Abort hook DLLs on startup error

This commit is contained in:
Tau 2019-11-05 18:03:24 -05:00
parent bf90450539
commit a87b8f72fa
4 changed files with 99 additions and 15 deletions

View File

@ -30,6 +30,7 @@ static struct chuni_hook_config chuni_hook_cfg;
static DWORD CALLBACK chuni_pre_startup(void)
{
HMODULE d3dc;
HRESULT hr;
dprintf("--- Begin chuni_pre_startup ---\n");
@ -54,15 +55,33 @@ static DWORD CALLBACK chuni_pre_startup(void)
/* Initialize emulation hooks */
platform_hook_init(
hr = platform_hook_init(
&chuni_hook_cfg.platform,
"SDBT",
"AAV1",
chuni_hook_mod);
amex_hook_init(&chuni_hook_cfg.amex, chunithm_jvs_init);
slider_hook_init(&chuni_hook_cfg.slider);
sg_reader_hook_init(&chuni_hook_cfg.aime, 12);
if (FAILED(hr)) {
return EXIT_FAILURE;
}
hr = amex_hook_init(&chuni_hook_cfg.amex, chunithm_jvs_init);
if (FAILED(hr)) {
return EXIT_FAILURE;
}
hr = slider_hook_init(&chuni_hook_cfg.slider);
if (FAILED(hr)) {
return EXIT_FAILURE;
}
hr = sg_reader_hook_init(&chuni_hook_cfg.aime, 12);
if (FAILED(hr)) {
return EXIT_FAILURE;
}
/* Initialize debug helpers */

View File

@ -27,6 +27,8 @@ static struct diva_hook_config diva_hook_cfg;
static DWORD CALLBACK diva_pre_startup(void)
{
HRESULT hr;
dprintf("--- Begin diva_pre_startup ---\n");
/* Config load */
@ -39,15 +41,33 @@ static DWORD CALLBACK diva_pre_startup(void)
/* Initialize emulation hooks */
platform_hook_init(
hr = platform_hook_init(
&diva_hook_cfg.platform,
"SBZV",
"AAV0",
diva_hook_mod);
amex_hook_init(&diva_hook_cfg.amex, diva_jvs_init);
sg_reader_hook_init(&diva_hook_cfg.aime, 10);
slider_hook_init();
if (FAILED(hr)) {
return EXIT_FAILURE;
}
hr = amex_hook_init(&diva_hook_cfg.amex, diva_jvs_init);
if (FAILED(hr)) {
return EXIT_FAILURE;
}
hr = sg_reader_hook_init(&diva_hook_cfg.aime, 10);
if (FAILED(hr)) {
return EXIT_FAILURE;
}
hr = slider_hook_init();
if (FAILED(hr)) {
return EXIT_FAILURE;
}
/* Initialize debug helpers */

View File

@ -27,6 +27,8 @@ static struct idz_hook_config idz_hook_cfg;
static DWORD CALLBACK idz_pre_startup(void)
{
HRESULT hr;
dprintf("--- Begin idz_pre_startup ---\n");
/* Config load */
@ -40,9 +42,27 @@ static DWORD CALLBACK idz_pre_startup(void)
/* Initialize emulation hooks */
platform_hook_init(&idz_hook_cfg.platform, "SDDF", "AAV2", idz_hook_mod);
amex_hook_init(&idz_hook_cfg.amex, idz_jvs_init);
sg_reader_hook_init(&idz_hook_cfg.aime, 10);
hr = platform_hook_init(
&idz_hook_cfg.platform,
"SDDF",
"AAV2",
idz_hook_mod);
if (FAILED(hr)) {
return hr;
}
hr = amex_hook_init(&idz_hook_cfg.amex, idz_jvs_init);
if (FAILED(hr)) {
return hr;
}
hr = sg_reader_hook_init(&idz_hook_cfg.aime, 10);
if (FAILED(hr)) {
return hr;
}
/* Initialize debug helpers */

View File

@ -22,6 +22,8 @@ static struct mu3_hook_config mu3_hook_cfg;
static DWORD CALLBACK mu3_pre_startup(void)
{
HRESULT hr;
dprintf("--- Begin mu3_pre_startup ---\n");
/* Load config */
@ -34,10 +36,33 @@ static DWORD CALLBACK mu3_pre_startup(void)
/* Initialize emulation hooks */
platform_hook_init(&mu3_hook_cfg.platform, "SDDT", "AAV2", mu3_hook_mod);
sg_reader_hook_init(&mu3_hook_cfg.aime, 1);
vfd_hook_init(2);
mu3_io4_hook_init();
hr = platform_hook_init(
&mu3_hook_cfg.platform,
"SDDT",
"AAV2",
mu3_hook_mod);
if (FAILED(hr)) {
return hr;
}
hr = sg_reader_hook_init(&mu3_hook_cfg.aime, 1);
if (FAILED(hr)) {
return hr;
}
hr = vfd_hook_init(2);
if (FAILED(hr)) {
return hr;
}
hr = mu3_io4_hook_init();
if (FAILED(hr)) {
return hr;
}
/* Initialize debug helpers */