rnd-20060727-2-src
[rocksndiamonds.git] / src / libgame / system.c
index 7d0351a6f804a0a823f3d8dafb936b147294a4fa..b3ad0f287a7f3c3b4fdee38f65158fff3ed63836 100644 (file)
@@ -93,6 +93,9 @@ void InitProgramInfo(char *argv0,
   program.version_major = VERSION_MAJOR(program_version);
   program.version_minor = VERSION_MINOR(program_version);
   program.version_patch = VERSION_PATCH(program_version);
+
+  program.error_filename = getErrorFilename(ERROR_BASENAME);
+  program.error_file = stderr;
 }
 
 void InitExitFunction(void (*exit_function)(int))
@@ -113,7 +116,10 @@ void InitPlatformDependentStuff(void)
 {
 #if defined(PLATFORM_MSDOS)
   _fmode = O_BINARY;
-  initErrorFile();
+#endif
+
+#if defined(PLATFORM_WIN32) || defined(PLATFORM_MSDOS)
+  openErrorFile();
 #endif
 
 #if defined(TARGET_SDL)
@@ -126,6 +132,10 @@ void InitPlatformDependentStuff(void)
 
 void ClosePlatformDependentStuff(void)
 {
+#if defined(PLATFORM_WIN32) || defined(PLATFORM_MSDOS)
+  closeErrorFile();
+#endif
+
 #if defined(PLATFORM_MSDOS)
   dumpErrorFile();
 #endif
@@ -818,6 +828,9 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
   else
     tmp_bitmap_1 = old_bitmap;
 
+  /* this is only needed to make compilers happy */
+  tmp_bitmap_2 = tmp_bitmap_8 = NULL;
+
   if (create_small_bitmaps)
   {
     /* calculate new image dimensions for small images */