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:
Wanne
2009-05-12 11:52:35 +00:00
parent c9117c2939
commit 2e99cbe784
31 changed files with 827 additions and 1575 deletions
+21 -1
View File
@@ -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( );