Changed logging level for Init functions (#15)
* Fixed card insert log message * Fixed waitForTouch not being set after card insert You could spam cards insert * Changed logging level for init functions
This commit is contained in:
parent
4bf913cd3a
commit
b5d9488df6
@ -475,16 +475,18 @@ Update () {
|
|||||||
insertEvent = GetProcAddress (plugin, p1 ? "Card1Insert" : "Card2Insert");
|
insertEvent = GetProcAddress (plugin, p1 ? "Card1Insert" : "Card2Insert");
|
||||||
if (insertEvent) {
|
if (insertEvent) {
|
||||||
((event *)insertEvent) ();
|
((event *)insertEvent) ();
|
||||||
hasInserted = true;
|
hasInserted = true;
|
||||||
|
waitingForTouch = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasInserted) {
|
if (!hasInserted) {
|
||||||
LogMessage (LOG_LEVEL_INFO, "Inserting card for player %d: %s", p1 ? "1" : "2", p1 ? accessCode1 : accessCode2);
|
LogMessage (LOG_LEVEL_INFO, "Inserting card for player %d: %s", p1 ? 1 : 2, p1 ? accessCode1 : accessCode2);
|
||||||
memcpy (cardData + 0x2C, p1 ? chipId1 : chipId2, 33);
|
memcpy (cardData + 0x2C, p1 ? chipId1 : chipId2, 33);
|
||||||
memcpy (cardData + 0x50, p1 ? accessCode1 : accessCode2, 21);
|
memcpy (cardData + 0x50, p1 ? accessCode1 : accessCode2, 21);
|
||||||
touchCallback (0, 0, cardData, touchData);
|
touchCallback (0, 0, cardData, touchData);
|
||||||
|
waitingForTouch = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,13 +43,12 @@ HOOK (HWND, CreateWindow, PROC_ADDRESS ("user32.dll", "CreateWindowExW"), DWORD
|
|||||||
if (wcscmp (lpWindowName, L"Taiko") == 0) {
|
if (wcscmp (lpWindowName, L"Taiko") == 0) {
|
||||||
if (windowed) dwStyle = WS_TILEDWINDOW ^ WS_MAXIMIZEBOX ^ WS_THICKFRAME;
|
if (windowed) dwStyle = WS_TILEDWINDOW ^ WS_MAXIMIZEBOX ^ WS_THICKFRAME;
|
||||||
|
|
||||||
hGameWnd = originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu,
|
hGameWnd
|
||||||
hInstance, lpParam);
|
= originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
||||||
return hGameWnd;
|
return hGameWnd;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance,
|
return originalCreateWindow (dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
|
||||||
lpParam);
|
|
||||||
}
|
}
|
||||||
HOOK (bool, SetWindowPosition, PROC_ADDRESS ("user32.dll", "SetWindowPos"), HWND hWnd, HWND hWndInsertAfter, i32 X, i32 Y, i32 cx, i32 cy,
|
HOOK (bool, SetWindowPosition, PROC_ADDRESS ("user32.dll", "SetWindowPos"), HWND hWnd, HWND hWndInsertAfter, i32 X, i32 Y, i32 cx, i32 cy,
|
||||||
u32 uFlags) {
|
u32 uFlags) {
|
||||||
@ -242,6 +241,8 @@ DllMain (HMODULE module, DWORD reason, LPVOID reserved) {
|
|||||||
GetPrivateProfileStringA ("card", "accessCode2", accessCode2, accessCode2, 21, ".\\card.ini");
|
GetPrivateProfileStringA ("card", "accessCode2", accessCode2, accessCode2, 21, ".\\card.ini");
|
||||||
GetPrivateProfileStringA ("card", "chipId2", chipId2, chipId2, 33, ".\\card.ini");
|
GetPrivateProfileStringA ("card", "chipId2", chipId2, chipId2, 33, ".\\card.ini");
|
||||||
|
|
||||||
|
LogMessage (LOG_LEVEL_WARN, "Loading patches, please wait...");
|
||||||
|
|
||||||
INSTALL_HOOK (ShowMouse);
|
INSTALL_HOOK (ShowMouse);
|
||||||
INSTALL_HOOK (ExitWindows);
|
INSTALL_HOOK (ExitWindows);
|
||||||
INSTALL_HOOK (CreateWindow);
|
INSTALL_HOOK (CreateWindow);
|
||||||
|
@ -559,7 +559,7 @@ CoCreateInstanceHook (const IID *const rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsC
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
LogMessage (LOG_LEVEL_DEBUG, "Init AmAuth patches");
|
LogMessage (LOG_LEVEL_INFO, "Init AmAuth patches");
|
||||||
|
|
||||||
MH_Initialize ();
|
MH_Initialize ();
|
||||||
MH_CreateHookApi (L"ole32.dll", "CoCreateInstance", (LPVOID)CoCreateInstanceHook,
|
MH_CreateHookApi (L"ole32.dll", "CoCreateInstance", (LPVOID)CoCreateInstanceHook,
|
||||||
|
@ -42,7 +42,7 @@ HOOK_DYNAMIC (bool, LoadASIODriver, void *a1, const char *a2) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
LogMessage (LOG_LEVEL_DEBUG, "Init Audio patches");
|
LogMessage (LOG_LEVEL_INFO, "Init Audio patches");
|
||||||
|
|
||||||
auto configPath = std::filesystem::current_path () / "config.toml";
|
auto configPath = std::filesystem::current_path () / "config.toml";
|
||||||
std::unique_ptr<toml_table_t, void (*) (toml_table_t *)> config_ptr (openConfig (configPath), toml_free);
|
std::unique_ptr<toml_table_t, void (*) (toml_table_t *)> config_ptr (openConfig (configPath), toml_free);
|
||||||
|
@ -201,7 +201,7 @@ D3D11CreateDeviceAndSwapChainWrap (IDXGIAdapter *pAdapter, D3D_DRIVER_TYPE Drive
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
LogMessage (LOG_LEVEL_DEBUG, "Init Dxgi patches");
|
LogMessage (LOG_LEVEL_INFO, "Init Dxgi patches");
|
||||||
i32 fpsLimit = 120;
|
i32 fpsLimit = 120;
|
||||||
|
|
||||||
auto configPath = std::filesystem::current_path () / "config.toml";
|
auto configPath = std::filesystem::current_path () / "config.toml";
|
||||||
|
@ -16,7 +16,7 @@ static u32 i = 0;
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init (float fpsLimit) {
|
Init (float fpsLimit) {
|
||||||
if (fpsLimit > 0) LogMessage (LOG_LEVEL_DEBUG, "Init Fps Limiter");
|
if (fpsLimit > 0) LogMessage (LOG_LEVEL_INFO, "Init Fps Limiter");
|
||||||
targetFrameTime = 1000.0 / fpsLimit;
|
targetFrameTime = 1000.0 / fpsLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ HOOK (HANDLE, CreateFileAHook, PROC_ADDRESS ("kernel32.dll", "CreateFileA"), LPC
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
LogMessage (LOG_LEVEL_DEBUG, "Init LayeredFs patches");
|
LogMessage (LOG_LEVEL_INFO, "Init LayeredFs patches");
|
||||||
|
|
||||||
auto configPath = std::filesystem::current_path () / "config.toml";
|
auto configPath = std::filesystem::current_path () / "config.toml";
|
||||||
std::unique_ptr<toml_table_t, void (*) (toml_table_t *)> config_ptr (openConfig (configPath), toml_free);
|
std::unique_ptr<toml_table_t, void (*) (toml_table_t *)> config_ptr (openConfig (configPath), toml_free);
|
||||||
|
@ -231,7 +231,7 @@ Update () {
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
LogMessage (LOG_LEVEL_DEBUG, "Init Qr patches");
|
LogMessage (LOG_LEVEL_INFO, "Init Qr patches");
|
||||||
|
|
||||||
if (!emulateQr) {
|
if (!emulateQr) {
|
||||||
LogMessage (LOG_LEVEL_WARN, "QR emulation disabled");
|
LogMessage (LOG_LEVEL_WARN, "QR emulation disabled");
|
||||||
|
@ -287,7 +287,7 @@ LocalizationCHS () {
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
LogMessage (LOG_LEVEL_DEBUG, "Init TestMode patches");
|
LogMessage (LOG_LEVEL_INFO, "Init TestMode patches");
|
||||||
|
|
||||||
auto configPath = std::filesystem::current_path () / "config.toml";
|
auto configPath = std::filesystem::current_path () / "config.toml";
|
||||||
std::unique_ptr<toml_table_t, void (*) (toml_table_t *)> config_ptr (openConfig (configPath), toml_free);
|
std::unique_ptr<toml_table_t, void (*) (toml_table_t *)> config_ptr (openConfig (configPath), toml_free);
|
||||||
|
@ -101,6 +101,7 @@ ReplaceLeaBufferAddress (const std::vector<uintptr_t> &bufferAddresses, void *ne
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
|
LogMessage (LOG_LEVEL_INFO, "Init CHN00 patches");
|
||||||
i32 xRes = 1920;
|
i32 xRes = 1920;
|
||||||
i32 yRes = 1080;
|
i32 yRes = 1080;
|
||||||
bool vsync = false;
|
bool vsync = false;
|
||||||
|
@ -37,6 +37,7 @@ ReplaceLeaBufferAddress (const std::vector<uintptr_t> &bufferAddresses, void *ne
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
|
LogMessage (LOG_LEVEL_INFO, "Init JNP00 patches");
|
||||||
i32 xRes = 1920;
|
i32 xRes = 1920;
|
||||||
i32 yRes = 1080;
|
i32 yRes = 1080;
|
||||||
bool vsync = false;
|
bool vsync = false;
|
||||||
|
@ -48,6 +48,7 @@ ReplaceLeaBufferAddress (const std::vector<uintptr_t> &bufferAddresses, void *ne
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
|
LogMessage (LOG_LEVEL_INFO, "Init JPN08 patches");
|
||||||
i32 xRes = 1920;
|
i32 xRes = 1920;
|
||||||
i32 yRes = 1080;
|
i32 yRes = 1080;
|
||||||
bool vsync = false;
|
bool vsync = false;
|
||||||
|
@ -410,6 +410,7 @@ ReplaceLeaBufferAddress (const std::vector<uintptr_t> &bufferAddresses, void *ne
|
|||||||
|
|
||||||
void
|
void
|
||||||
Init () {
|
Init () {
|
||||||
|
LogMessage (LOG_LEVEL_INFO, "Init JPN39 patches");
|
||||||
i32 xRes = 1920;
|
i32 xRes = 1920;
|
||||||
i32 yRes = 1080;
|
i32 yRes = 1080;
|
||||||
bool vsync = false;
|
bool vsync = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user