siva: impl NanoTS_PTool_win8 hook
This commit is contained in:
parent
ffcf6dafc2
commit
eedd32c8f9
@ -21,6 +21,16 @@ void siva_dll_config_load(
|
||||
filename);
|
||||
}
|
||||
|
||||
void touch_config_load(
|
||||
struct touch_config *cfg,
|
||||
const wchar_t *filename)
|
||||
{
|
||||
assert(cfg != NULL);
|
||||
assert(filename != NULL);
|
||||
|
||||
cfg->enable = GetPrivateProfileIntW(L"touch", L"enable", 1, filename);
|
||||
}
|
||||
|
||||
void siva_hook_config_load(
|
||||
struct siva_hook_config *cfg,
|
||||
const wchar_t *filename)
|
||||
@ -31,4 +41,5 @@ void siva_hook_config_load(
|
||||
platform_config_load(&cfg->platform, filename);
|
||||
siva_dll_config_load(&cfg->dll, filename);
|
||||
gfx_config_load(&cfg->gfx, filename);
|
||||
touch_config_load(&cfg->touch, filename);
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "sivahook/siva-dll.h"
|
||||
#include "sivahook/touch.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "gfxhook/config.h"
|
||||
@ -12,6 +13,7 @@ struct siva_hook_config {
|
||||
struct platform_config platform;
|
||||
struct siva_dll_config dll;
|
||||
struct gfx_config gfx;
|
||||
struct touch_config touch;
|
||||
};
|
||||
|
||||
void siva_hook_config_load(
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include "sivahook/config.h"
|
||||
#include "sivahook/siva-dll.h"
|
||||
#include "sivahook/touch.h"
|
||||
#include "sivahook/unity.h"
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
14
sivahook/touch.c
Normal file
14
sivahook/touch.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <windows.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "sivahook/touch.h"
|
||||
#include "hooklib/createprocess.h"
|
||||
|
||||
HRESULT touch_hook_init(const struct touch_config *cfg)
|
||||
{
|
||||
if (!cfg->enable) {
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
return createprocess_push_hook_a("NanoTS_PTool_win8.exe", "inject.exe -d -k sivahook.dll ", NULL, false);
|
||||
}
|
9
sivahook/touch.h
Normal file
9
sivahook/touch.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct touch_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
HRESULT touch_hook_init(const struct touch_config *cfg);
|
Loading…
Reference in New Issue
Block a user