mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user