Skip to content

Commit

Permalink
Clear console InfoMessages after game/mission ends.
Browse files Browse the repository at this point in the history
Fixes ticket:4621.
  • Loading branch information
Forgon2100 authored and KJeff01 committed Aug 22, 2017
1 parent ac08585 commit 9edf1e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/console.cpp
Expand Up @@ -421,6 +421,13 @@ void displayConsoleMessages()
}
}

/** destroy CONPRINTF messages **/
void clearInfoMessages()
{
InfoMessages.clear();
}


/** Allows toggling of the box under the console text */
void setConsoleBackdropStatus(bool state)
{
Expand Down
1 change: 1 addition & 0 deletions src/console.h
Expand Up @@ -61,6 +61,7 @@ UDWORD getConsoleLineInfo();
void permitNewConsoleMessages(bool allow);
void toggleConsoleDrop();
void setHistoryMode(bool mode);
void clearInfoMessages();

#if defined(DEBUG)
# define debug_console(...) \
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Expand Up @@ -599,6 +599,7 @@ static void startGameLoop()
*/
static void stopGameLoop()
{
clearInfoMessages(); // clear CONPRINTF messages before each new game/mission
if (gameLoopStatus != GAMECODE_NEWLEVEL)
{
clearBlueprints();
Expand Down

0 comments on commit 9edf1e6

Please sign in to comment.