16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 14:39:18 +02:00

further pruning of legacy render code, now runs on opengl 3.3 core

profile
This commit is contained in:
milek7
2018-06-24 20:21:07 +02:00
parent c42afa2401
commit 0c5f990528
30 changed files with 400 additions and 1241 deletions

View File

@@ -82,24 +82,23 @@ void WriteLog( const char *str, logtype const Type ) {
output.open( filename, std::ios::trunc );
}
output << str << "\n";
output.flush();
}
ui_log->text_lines.emplace_back(std::string(str), Global.UITextColor);
if (ui_log->text_lines.size() > 20)
ui_log->text_lines.pop_front();
#ifdef _WIN32
if( Global.iWriteLogEnabled & 2 ) {
#ifdef _WIN32
// hunter-271211: pisanie do konsoli tylko, gdy nie jest ukrywana
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), FOREGROUND_GREEN | FOREGROUND_INTENSITY );
DWORD wr = 0;
WriteConsole( GetStdHandle( STD_OUTPUT_HANDLE ), str, (DWORD)strlen( str ), &wr, NULL );
WriteConsole( GetStdHandle( STD_OUTPUT_HANDLE ), endstring, (DWORD)strlen( endstring ), &wr, NULL );
}
#else
printf("%s\n", str);
#endif
}
}
// Ra: bezwarunkowa rejestracja poważnych błędów