mirror of
https://github.com/PretendoNetwork/Inkay.git
synced 2026-07-14 15:41:11 -05:00
chore: Reduce logspam
This commit is contained in:
parent
b6f9995875
commit
662ebaf299
14
src/main.cpp
14
src/main.cpp
|
|
@ -43,13 +43,15 @@
|
|||
|
||||
#include <gx2/surface.h>
|
||||
|
||||
#define INKAY_VERSION "v2.3"
|
||||
|
||||
/**
|
||||
Mandatory plugin information.
|
||||
If not set correctly, the loader will refuse to use the plugin.
|
||||
**/
|
||||
WUPS_PLUGIN_NAME("Inkay");
|
||||
WUPS_PLUGIN_DESCRIPTION("Pretendo Network Patcher");
|
||||
WUPS_PLUGIN_VERSION("v2.3");
|
||||
WUPS_PLUGIN_VERSION(INKAY_VERSION);
|
||||
WUPS_PLUGIN_AUTHOR("Pretendo contributors");
|
||||
WUPS_PLUGIN_LICENSE("ISC");
|
||||
|
||||
|
|
@ -114,7 +116,7 @@ INITIALIZE_PLUGIN() {
|
|||
.major = 5, .minor = 5, .patch = 5, .region = 'E'
|
||||
};
|
||||
}
|
||||
DEBUG_FUNCTION_LINE("Running on %d.%d.%d%c",
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Running on %d.%d.%d%c",
|
||||
os_version.major, os_version.minor, os_version.patch, os_version.region
|
||||
);
|
||||
|
||||
|
|
@ -129,11 +131,11 @@ INITIALIZE_PLUGIN() {
|
|||
for (const auto& patch : url_patches) {
|
||||
write_string(patch.address, patch.url);
|
||||
}
|
||||
DEBUG_FUNCTION_LINE("Pretendo URL and NoSSL patches applied successfully.");
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Pretendo URL and NoSSL patches applied successfully.");
|
||||
StartNotificationThread("Using Pretendo Network");
|
||||
}
|
||||
else {
|
||||
DEBUG_FUNCTION_LINE("Pretendo URL and NoSSL patches skipped.");
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Pretendo URL and NoSSL patches skipped.");
|
||||
StartNotificationThread("Using Nintendo Network");
|
||||
}
|
||||
|
||||
|
|
@ -156,13 +158,13 @@ ON_APPLICATION_START() {
|
|||
WHBLogUdpInit();
|
||||
WHBLogCafeInit();
|
||||
|
||||
DEBUG_FUNCTION_LINE("Inkay: hewwo!\n");
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Inkay " INKAY_VERSION " starting up\n");
|
||||
|
||||
setup_olv_libs();
|
||||
matchmaking_notify_titleswitch();
|
||||
}
|
||||
|
||||
ON_APPLICATION_ENDS() {
|
||||
DEBUG_FUNCTION_LINE("Inkay: shutting down...\n");
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("Unloading Inkay...\n");
|
||||
StopNotificationThread();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,17 +13,23 @@ extern "C" {
|
|||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__)
|
||||
|
||||
#define OSFATAL_FUNCTION_LINE(FMT, ARGS...)do { \
|
||||
OSFatal_printf("[%s]%s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
OSFatal_printf("[(P) Inkay][%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
} while (0)
|
||||
|
||||
#define DEBUG_FUNCTION_LINE(FMT, ARGS...)do { \
|
||||
WHBLogPrintf("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
WHBLogPrintf("[(P) Inkay][%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
} while (0);
|
||||
|
||||
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...)do { \
|
||||
WHBLogWritef("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
WHBLogWritef("[(P) Inkay][%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \
|
||||
} while (0);
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) DEBUG_FUNCTION_LINE(FMT, ARGS...)
|
||||
#else
|
||||
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while(0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ bool replace(uint32_t start, uint32_t size, const char* original_val, size_t ori
|
|||
for (uint32_t addr = start; addr < start + size - original_val_sz; addr++) {
|
||||
int ret = memcmp(original_val, (void*)addr, original_val_sz);
|
||||
if (ret == 0) {
|
||||
DEBUG_FUNCTION_LINE("found str @%08x: %s", addr, (const char*)addr);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("found str @%08x: %s", addr, (const char*)addr);
|
||||
KernelCopyData(OSEffectiveToPhysical(addr), OSEffectiveToPhysical((uint32_t)new_val), new_val_sz);
|
||||
DEBUG_FUNCTION_LINE("new str @%08x: %s", addr, (const char*)addr);
|
||||
DEBUG_FUNCTION_LINE_VERBOSE("new str @%08x: %s", addr, (const char*)addr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user