Move cabinetofflinedata to exe folder
This commit is contained in:
parent
15658043aa
commit
fbb8e7b6ed
@ -16,6 +16,9 @@ i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) {
|
|||||||
// Save settings cross session
|
// Save settings cross session
|
||||||
WRITE_MEMORY (ASLR(0x140B5C528, handle), u8, "./Setting1.bin");
|
WRITE_MEMORY (ASLR(0x140B5C528, handle), u8, "./Setting1.bin");
|
||||||
WRITE_MEMORY (ASLR(0x140B5C538, handle), u8, "./Setting2.bin");
|
WRITE_MEMORY (ASLR(0x140B5C538, handle), u8, "./Setting2.bin");
|
||||||
|
// CabinetOfflineData
|
||||||
|
WRITE_MEMORY (ASLR(0x140b1b4b0, handle), u8, "./");
|
||||||
|
WRITE_MEMORY (ASLR(0x14001c941, handle), u8, 0x02);
|
||||||
|
|
||||||
void *amHandle = GetModuleHandle ("AMFrameWork.dll");
|
void *amHandle = GetModuleHandle ("AMFrameWork.dll");
|
||||||
WRITE_MEMORY (amHandle + 0x33EF7, u8, 0xEB);
|
WRITE_MEMORY (amHandle + 0x33EF7, u8, 0xEB);
|
||||||
|
@ -2,19 +2,6 @@
|
|||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "poll.h"
|
#include "poll.h"
|
||||||
|
|
||||||
HWND windowHandle = 0;
|
|
||||||
|
|
||||||
int CALLBACK
|
|
||||||
enumWindows (HWND handle, LPARAM param) {
|
|
||||||
char buf[64];
|
|
||||||
GetClassName (handle, buf, 64);
|
|
||||||
if (!strcmp (buf, "nuFoundation.Window")) {
|
|
||||||
windowHandle = handle;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// force show cursor
|
// force show cursor
|
||||||
HOOK_DYNAMIC (i32, __stdcall, ShowMouse, i32 show) { return originalShowMouse (true); }
|
HOOK_DYNAMIC (i32, __stdcall, ShowMouse, i32 show) { return originalShowMouse (true); }
|
||||||
|
|
||||||
@ -57,9 +44,11 @@ u16 __fastcall bnusio_GetAnalogIn (u8 which) {
|
|||||||
u16 __fastcall bnusio_GetCoin (i32 a1) {
|
u16 __fastcall bnusio_GetCoin (i32 a1) {
|
||||||
static int coin_count = 0;
|
static int coin_count = 0;
|
||||||
if (a1 == 1) {
|
if (a1 == 1) {
|
||||||
static bool inited = false;
|
static bool inited = false;
|
||||||
|
static HWND windowHandle = 0;
|
||||||
if (!inited) {
|
if (!inited) {
|
||||||
EnumWindows (enumWindows, 0);
|
windowHandle = FindWindowA ("nuFoundation.Window", 0);
|
||||||
|
|
||||||
InitializePoll (windowHandle);
|
InitializePoll (windowHandle);
|
||||||
|
|
||||||
toml_table_t *config = openConfig (configPath ("keyconfig.toml"));
|
toml_table_t *config = openConfig (configPath ("keyconfig.toml"));
|
||||||
@ -115,7 +104,7 @@ i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) {
|
|||||||
|
|
||||||
// Set current directory to the directory of the executable
|
// Set current directory to the directory of the executable
|
||||||
// Find all files in the plugins directory that end with .dll
|
// Find all files in the plugins directory that end with .dll
|
||||||
// Call loadlibraryA on those files
|
// Call loadlibraryW on those files
|
||||||
// Create a message box if they fail to load
|
// Create a message box if they fail to load
|
||||||
wchar_t path[MAX_PATH];
|
wchar_t path[MAX_PATH];
|
||||||
GetModuleFileNameW (NULL, path, MAX_PATH);
|
GetModuleFileNameW (NULL, path, MAX_PATH);
|
||||||
|
10
src/poll.h
10
src/poll.h
@ -47,10 +47,12 @@ enum EnumType { none, keycode, button, axis, scroll };
|
|||||||
|
|
||||||
struct ConfigValue {
|
struct ConfigValue {
|
||||||
enum EnumType type;
|
enum EnumType type;
|
||||||
uint8_t keycode;
|
union {
|
||||||
SDL_GameControllerButton button;
|
uint8_t keycode;
|
||||||
enum SDLAxis axis;
|
SDL_GameControllerButton button;
|
||||||
enum Scroll scroll;
|
enum SDLAxis axis;
|
||||||
|
enum Scroll scroll;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct InternalButtonState {
|
struct InternalButtonState {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user