gui: preserve order of gui_print vs gui_msg
- rename __gui_print to internal_gui_print (__* is reserved for compiler)
- translate outstanding messages in internal_gui_print
- add locking because background thread could print while we render
- minor cleanup
Change-Id: Ib687d2cfb4763ad08ad4d4b76daf5b129d61d2e2
diff --git a/gui/pages.cpp b/gui/pages.cpp
index b2a978f..bf6c692 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -58,11 +58,6 @@
extern int gGuiRunning;
-// From console.cpp
-extern size_t last_message_count;
-extern std::vector<std::string> gConsole;
-extern std::vector<std::string> gConsoleColor;
-
std::map<std::string, PageSet*> PageManager::mPageSets;
PageSet* PageManager::mCurrentSet;
MouseCursor *PageManager::mMouseCursor = NULL;
@@ -1541,9 +1536,7 @@
}
// This makes the console re-translate
- last_message_count = 0;
- gConsole.clear();
- gConsoleColor.clear();
+ GUIConsole::Clear_For_Retranslation();
return ret_val;
}