forked from Hay1tsme/segatools
Migrate cm/mai2/mu3 to unityhook
This commit is contained in:
parent
49f7189d35
commit
ecfc104f0f
|
@ -40,4 +40,5 @@ void cm_hook_config_load(
|
|||
vfd_config_load(&cfg->vfd, filename);
|
||||
touch_screen_config_load(&cfg->touch, filename);
|
||||
cm_dll_config_load(&cfg->dll, filename);
|
||||
unity_config_load(&cfg->unity, filename);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#include "platform/config.h"
|
||||
|
||||
#include "unityhook/config.h"
|
||||
|
||||
struct cm_hook_config {
|
||||
struct platform_config platform;
|
||||
struct aime_config aime;
|
||||
|
@ -19,6 +21,7 @@ struct cm_hook_config {
|
|||
struct vfd_config vfd;
|
||||
struct cm_dll_config dll;
|
||||
struct touch_screen_config touch;
|
||||
struct unity_config unity;
|
||||
};
|
||||
|
||||
void cm_dll_config_load(
|
||||
|
|
|
@ -16,10 +16,11 @@
|
|||
#include "cmhook/config.h"
|
||||
#include "cmhook/io4.h"
|
||||
#include "cmhook/cm-dll.h"
|
||||
#include "cmhook/unity.h"
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
||||
#include "unityhook/hook.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
||||
static HMODULE cm_hook_mod;
|
||||
|
@ -83,7 +84,7 @@ static DWORD CALLBACK cm_pre_startup(void)
|
|||
There seems to be an issue with other DLL hooks if `LoadLibraryW` is
|
||||
hooked earlier in the `cmhook` initialization. */
|
||||
|
||||
unity_hook_init();
|
||||
unity_hook_init(&cm_hook_cfg.unity, cm_hook_mod);
|
||||
|
||||
/* Initialize debug helpers */
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ shared_library(
|
|||
hooklib_lib,
|
||||
cmio_lib,
|
||||
platform_lib,
|
||||
unityhook_lib,
|
||||
util_lib,
|
||||
],
|
||||
sources : [
|
||||
|
@ -26,7 +27,5 @@ shared_library(
|
|||
'io4.h',
|
||||
'cm-dll.c',
|
||||
'cm-dll.h',
|
||||
'unity.h',
|
||||
'unity.c',
|
||||
],
|
||||
)
|
||||
|
|
|
@ -68,6 +68,11 @@ dipsw1=0
|
|||
; Enable/Disable WinTouch emulation
|
||||
enable=0
|
||||
|
||||
[unity]
|
||||
; Path to a .NET DLL that should run before the game. Useful for loading
|
||||
; modding frameworks such as BepInEx.
|
||||
targetAssembly=
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
; Custom IO settings
|
||||
; -----------------------------------------------------------------------------
|
||||
|
|
|
@ -83,6 +83,15 @@ path=
|
|||
; Leave empty if you want to use Segatools built-in keyboard input.
|
||||
path=
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
; Misc. hook settings
|
||||
; -----------------------------------------------------------------------------
|
||||
|
||||
[unity]
|
||||
; Path to a .NET DLL that should run before the game. Useful for loading
|
||||
; modding frameworks such as BepInEx.
|
||||
targetAssembly=
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
; Input settings
|
||||
; -----------------------------------------------------------------------------
|
||||
|
|
|
@ -72,6 +72,11 @@ dipsw1=1
|
|||
[gfx]
|
||||
enable=1
|
||||
|
||||
[unity]
|
||||
; Path to a .NET DLL that should run before the game. Useful for loading
|
||||
; modding frameworks such as BepInEx.
|
||||
targetAssembly=
|
||||
|
||||
; -----------------------------------------------------------------------------
|
||||
; Custom IO settings
|
||||
; -----------------------------------------------------------------------------
|
||||
|
|
|
@ -39,4 +39,5 @@ void mai2_hook_config_load(
|
|||
io4_config_load(&cfg->io4, filename);
|
||||
vfd_config_load(&cfg->vfd, filename);
|
||||
mai2_dll_config_load(&cfg->dll, filename);
|
||||
unity_config_load(&cfg->unity, filename);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "platform/config.h"
|
||||
|
||||
#include "unityhook/config.h"
|
||||
|
||||
struct mai2_hook_config {
|
||||
struct platform_config platform;
|
||||
struct aime_config aime;
|
||||
|
@ -17,6 +19,7 @@ struct mai2_hook_config {
|
|||
struct io4_config io4;
|
||||
struct vfd_config vfd;
|
||||
struct mai2_dll_config dll;
|
||||
struct unity_config unity;
|
||||
};
|
||||
|
||||
void mai2_dll_config_load(
|
||||
|
|
|
@ -12,10 +12,11 @@
|
|||
#include "mai2hook/config.h"
|
||||
#include "mai2hook/io4.h"
|
||||
#include "mai2hook/mai2-dll.h"
|
||||
#include "mai2hook/unity.h"
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
||||
#include "unityhook/hook.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
||||
static HMODULE mai2_hook_mod;
|
||||
|
@ -80,7 +81,7 @@ static DWORD CALLBACK mai2_pre_startup(void)
|
|||
There seems to be an issue with other DLL hooks if `LoadLibraryW` is
|
||||
hooked earlier in the `mai2hook` initialization. */
|
||||
|
||||
unity_hook_init();
|
||||
unity_hook_init(&mai2_hook_cfg.unity, mai2_hook_mod);
|
||||
|
||||
/* Initialize debug helpers */
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ shared_library(
|
|||
hooklib_lib,
|
||||
mai2io_lib,
|
||||
platform_lib,
|
||||
unityhook_lib,
|
||||
util_lib,
|
||||
],
|
||||
sources : [
|
||||
|
@ -25,7 +26,5 @@ shared_library(
|
|||
'io4.h',
|
||||
'mai2-dll.c',
|
||||
'mai2-dll.h',
|
||||
'unity.h',
|
||||
'unity.c',
|
||||
],
|
||||
)
|
||||
|
|
|
@ -42,4 +42,5 @@ void mu3_hook_config_load(
|
|||
gfx_config_load(&cfg->gfx, filename);
|
||||
vfd_config_load(&cfg->vfd, filename);
|
||||
mu3_dll_config_load(&cfg->dll, filename);
|
||||
unity_config_load(&cfg->unity, filename);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
#include "platform/config.h"
|
||||
|
||||
#include "unityhook/config.h"
|
||||
|
||||
struct mu3_hook_config {
|
||||
struct platform_config platform;
|
||||
struct aime_config aime;
|
||||
|
@ -22,6 +24,7 @@ struct mu3_hook_config {
|
|||
// struct led15093_config led15093;
|
||||
struct vfd_config vfd;
|
||||
struct mu3_dll_config dll;
|
||||
struct unity_config unity;
|
||||
};
|
||||
|
||||
void mu3_dll_config_load(
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "board/io4.h"
|
||||
#include "board/sg-reader.h"
|
||||
#include "board/vfd.h"
|
||||
|
||||
|
@ -20,10 +19,12 @@
|
|||
#include "mu3hook/config.h"
|
||||
#include "mu3hook/io4.h"
|
||||
#include "mu3hook/mu3-dll.h"
|
||||
#include "mu3hook/unity.h"
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
||||
#include "unityhook/config.h"
|
||||
#include "unityhook/hook.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
||||
static HMODULE mu3_hook_mod;
|
||||
|
@ -99,7 +100,7 @@ static DWORD CALLBACK mu3_pre_startup(void)
|
|||
There seems to be an issue with other DLL hooks if `LoadLibraryW` is
|
||||
hooked earlier in the `mu3hook` initialization. */
|
||||
|
||||
unity_hook_init();
|
||||
unity_hook_init(&mu3_hook_cfg.unity, mu3_hook_mod);
|
||||
|
||||
/* Initialize debug helpers */
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ shared_library(
|
|||
hooklib_lib,
|
||||
mu3io_lib,
|
||||
platform_lib,
|
||||
unityhook_lib,
|
||||
util_lib,
|
||||
],
|
||||
sources : [
|
||||
|
@ -27,7 +28,5 @@ shared_library(
|
|||
'io4.h',
|
||||
'mu3-dll.c',
|
||||
'mu3-dll.h',
|
||||
'unity.h',
|
||||
'unity.c',
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue