mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Downgrade startup ini errors to warnings (#229)
This commit is contained in:
+7
-8
@@ -398,7 +398,7 @@ UINT32 InitScreenHandle(void)
|
|||||||
int y = 40;
|
int y = 40;
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
sgp::Logger_ID ini_id = sgp::Logger::instance().createLogger();
|
sgp::Logger_ID ini_id = sgp::Logger::instance().createLogger();
|
||||||
sgp::Logger::instance().connectFile(ini_id, L"ERROR_REPORT.iniErrorMessages.txt", false, sgp::Logger::FLUSH_ON_DELETE);
|
sgp::Logger::instance().connectFile(ini_id, L"iniErrorReport.txt", false, sgp::Logger::FLUSH_ON_DELETE);
|
||||||
sgp::Logger::LogInstance logger = sgp::Logger::instance().logger(ini_id);
|
sgp::Logger::LogInstance logger = sgp::Logger::instance().logger(ini_id);
|
||||||
#endif
|
#endif
|
||||||
while (! iniErrorMessages.empty()) {
|
while (! iniErrorMessages.empty()) {
|
||||||
@@ -412,17 +412,17 @@ UINT32 InitScreenHandle(void)
|
|||||||
if (iniErrorMessage_create_out_file)
|
if (iniErrorMessage_create_out_file)
|
||||||
{
|
{
|
||||||
#ifndef USE_VFS
|
#ifndef USE_VFS
|
||||||
fopen_s( &file_pointer, "..\\ERROR_REPORT.iniErrorMessages.txt", "w" );
|
fopen_s( &file_pointer, "..\\iniErrorReport.txt", "w" );
|
||||||
#endif
|
#endif
|
||||||
y += 25;
|
y += 25;
|
||||||
swprintf( str, L"%S", "ERROR_REPORT.iniErrorMessages.txt has been created. Please review its content." );
|
swprintf( str, L"%S", "Warning: found the following ini errors. iniErrorReport.txt has been created." );
|
||||||
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_ORANGE, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||||
iniErrorMessage_create_out_file = FALSE;
|
iniErrorMessage_create_out_file = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifndef USE_VFS
|
#ifndef USE_VFS
|
||||||
fopen_s( &file_pointer, "..\\ERROR_REPORT.iniErrorMessages.txt", "a+" );
|
fopen_s( &file_pointer, "..\\iniErrorReport.txt", "a+" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,10 +434,9 @@ UINT32 InitScreenHandle(void)
|
|||||||
#else
|
#else
|
||||||
logger << iniErrorMessage << sgp::endl;
|
logger << iniErrorMessage << sgp::endl;
|
||||||
#endif
|
#endif
|
||||||
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_ORANGE, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||||
iniErrorMessages.pop();
|
|
||||||
|
|
||||||
if (iniErrorMessages.empty()) {for(int x=0 ; x <= 65535*2 ; x++);}
|
iniErrorMessages.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateScreen( );
|
InvalidateScreen( );
|
||||||
|
|||||||
Reference in New Issue
Block a user