0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

construct: Show console message only once per execution.

This commit is contained in:
Jason Volk 2018-04-26 03:19:16 -07:00
parent d6ce6d9b43
commit 0df06b0b62

View file

@ -114,7 +114,12 @@ try
});
console_init();
std::cout << console_message << generic_message;
static std::once_flag seen_message;
std::call_once(seen_message, []
{
std::cout << console_message << generic_message;
});
while(1)
{
std::cout << "\n> " << std::flush;