Skip to content

Commit

Permalink
error message box: only show it once at most
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiao921 committed May 28, 2024
1 parent d520b34 commit 86ff7b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ static void hook_disable_f10_launch(void *bugInfo)
{
LOG(WARNING) << "sgg::LaunchBugReporter denied";

MessageBoxA(0, "The game has encountered a fatal error, the error is in the log file and in the console.", "Hell2Modding", MB_ICONERROR | MB_OK);
static bool once = true;
if (once)
{
MessageBoxA(0, "The game has encountered a fatal error, the error is in the log file and in the console.", "Hell2Modding", MB_ICONERROR | MB_OK);
once = false;
}
}

extern "C"
Expand Down

0 comments on commit 86ff7b6

Please sign in to comment.