mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2025-01-31 20:15:27 +01:00
Merge pull request 'kemono: only load I/O dll inside amdaemon' (#38) from Haruka/segatools:kemonofr64bit into develop
Reviewed-on: https://gitea.tendokyu.moe/Dniel97/segatools/pulls/38
This commit is contained in:
commit
53fb8c28ea
@ -12,19 +12,44 @@
|
|||||||
|
|
||||||
#include "platform/config.h"
|
#include "platform/config.h"
|
||||||
|
|
||||||
|
// Check windows
|
||||||
|
#if _WIN32 || _WIN64
|
||||||
|
#if _WIN64
|
||||||
|
#define ENV64BIT
|
||||||
|
#else
|
||||||
|
#define ENV32BIT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Check GCC
|
||||||
|
#if __GNUC__
|
||||||
|
#if __x86_64__ || __ppc64__
|
||||||
|
#define ENV64BIT
|
||||||
|
#else
|
||||||
|
#define ENV32BIT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void kemono_dll_config_load(
|
void kemono_dll_config_load(
|
||||||
struct kemono_dll_config *cfg,
|
struct kemono_dll_config *cfg,
|
||||||
const wchar_t *filename) {
|
const wchar_t *filename) {
|
||||||
assert(cfg != NULL);
|
assert(cfg != NULL);
|
||||||
assert(filename != NULL);
|
assert(filename != NULL);
|
||||||
|
|
||||||
GetPrivateProfileStringW(
|
#if defined(ENV32BIT)
|
||||||
L"kemonoio",
|
// Always empty, due to amdaemon being 64 bit in 32 bit mode
|
||||||
L"path",
|
memset(cfg->path, 0, sizeof(cfg->path));
|
||||||
L"",
|
#elif defined(ENV64BIT)
|
||||||
cfg->path,
|
GetPrivateProfileStringW(
|
||||||
_countof(cfg->path),
|
L"kemonoio",
|
||||||
filename);
|
L"path",
|
||||||
|
L"",
|
||||||
|
cfg->path,
|
||||||
|
_countof(cfg->path),
|
||||||
|
filename);
|
||||||
|
#else
|
||||||
|
#error "Unknown environment"
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void led15093_config_load(struct led15093_config *cfg, const wchar_t *filename)
|
void led15093_config_load(struct led15093_config *cfg, const wchar_t *filename)
|
||||||
|
@ -34,6 +34,7 @@ static DWORD CALLBACK kemono_pre_startup(void) {
|
|||||||
|
|
||||||
/* Load config */
|
/* Load config */
|
||||||
|
|
||||||
|
kemono_hook_cfg.aime.dll.path64 = true;
|
||||||
kemono_hook_config_load(&kemono_hook_cfg, L".\\segatools.ini");
|
kemono_hook_config_load(&kemono_hook_cfg, L".\\segatools.ini");
|
||||||
|
|
||||||
/* Hook Win32 APIs */
|
/* Hook Win32 APIs */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user