loveplus: remove log spam (#326)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Remove spammy logging in LP

## Testing
It works 👍
This commit is contained in:
bicarus-dev
2025-05-09 09:47:38 -07:00
committed by GitHub
parent aafea3b1c1
commit 257afe0cd3
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -123,7 +123,23 @@ namespace games::loveplus {
return lp_args.data();
}
static bool lp_spam_remover(void *user, const std::string &data, logger::Style style, std::string &out) {
if (data.empty() || data[0] != '[') {
return false;
}
if (data.find("> [INFO] err_code: 0, err_title: , err_str:") != std::string::npos) {
out = "";
return true;
}
return false;
}
LovePlusGame::LovePlusGame() : Game("LovePlus") {
logger::hook_add(lp_spam_remover, nullptr);
}
LovePlusGame::~LovePlusGame() {
logger::hook_remove(lp_spam_remover, this);
}
void LovePlusGame::attach() {
@@ -168,6 +184,7 @@ namespace games::loveplus {
// get command line hook
HMODULE lpac = libutils::try_library("lpac.dll");
detour::iat("GetCommandLineA", GetCommandLineA_hook, lpac);
}
void LovePlusGame::detach() {