mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Improved Game Settings (by Arynn)
- fixed corruption of ja2.set - ja2.set will no be saved to ja2_settings.ini - a few more minor game setting fixes and error tracings git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2844 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+21
-1
@@ -429,12 +429,32 @@ UINT32 InitScreenHandle(void)
|
||||
// Handle queued .ini file error messages
|
||||
int y = 40;
|
||||
while (! iniErrorMessages.empty()) {
|
||||
FILE *file_pointer;
|
||||
static BOOL iniErrorMessage_create_out_file = TRUE;
|
||||
std::string iniErrorMessage = iniErrorMessages.top();
|
||||
y += 10;
|
||||
CHAR16 str[256];
|
||||
|
||||
if (iniErrorMessage_create_out_file)
|
||||
{
|
||||
fopen_s( &file_pointer, "..\\ERROR_REPORT.iniErrorMessages.txt", "w" );
|
||||
y += 25;
|
||||
swprintf( str, L"%S", "ERROR_REPORT.iniErrorMessages.txt has been created. Please review its content." );
|
||||
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||
iniErrorMessage_create_out_file = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fopen_s( &file_pointer, "..\\ERROR_REPORT.iniErrorMessages.txt", "a+" );
|
||||
}
|
||||
|
||||
y += 25;
|
||||
swprintf( str, L"%S", iniErrorMessage.c_str() );
|
||||
fprintf_s (file_pointer , "%S\n" , str );
|
||||
fclose( file_pointer );
|
||||
DisplayWrappedString( 10, y, 560, 2, FONT12ARIAL, FONT_RED, str, FONT_BLACK, TRUE, LEFT_JUSTIFIED );
|
||||
iniErrorMessages.pop();
|
||||
|
||||
if (iniErrorMessages.empty()) {for(int x=0 ; x <= 65535*2 ; x++);}
|
||||
}
|
||||
|
||||
InvalidateScreen( );
|
||||
|
||||
Reference in New Issue
Block a user