| 41 | } |
| 42 | |
| 43 | void Console::LocalPrint(DebugMessageType type, char const* msg) |
| 44 | { |
| 45 | if (enabled_ && (!inputEnabled_ || !silence_)) { |
| 46 | SetColor(type); |
| 47 | OutputDebugStringA(msg); |
| 48 | OutputDebugStringA("\r\n"); |
| 49 | std::cout << msg << std::endl; |
| 50 | std::cout.flush(); |
| 51 | SetColor(DebugMessageType::Debug); |
| 52 | } |
| 53 | |
| 54 | if (logToFile_) { |
| 55 | logFile_.write(msg, strlen(msg)); |
| 56 | logFile_.write("\r\n", 2); |
| 57 | logFile_.flush(); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | void Console::Print(DebugMessageType type, char const* msg) |
| 62 | { |