fixed bug with losing image filename when scaling bitmaps
[rocksndiamonds.git] / src / libgame / system.c
index 5888f344a81c9cbd4585fdadff54f0a27b89d1fb..d5504854bc13d90f30ee9c1a3f9f8adf3387ac2f 100644 (file)
@@ -45,6 +45,7 @@ LevelDirTree         *leveldir_first = NULL;
 LevelDirTree          *leveldir_current = NULL;
 int                    level_nr;
 
+struct LevelSetInfo    levelset;
 struct LevelStats      level_stats[MAX_LEVELS];
 
 DrawWindow            *window = NULL;
@@ -122,6 +123,7 @@ void InitScoresInfo()
   program.global_scores = directoryExists(global_scores_dir);
   program.many_scores_per_name = !program.global_scores;
 
+#if 0
   if (options.debug)
   {
     if (program.global_scores)
@@ -136,6 +138,7 @@ void InitScoresInfo()
       Error(ERR_DEBUG, "Using private, single-user scores directory.");
     }
   }
+#endif
 
   free(global_scores_dir);
 }
@@ -1385,7 +1388,13 @@ static void CreateScaledBitmaps(Bitmap **bitmaps, int zoom_factor,
        free_old_bitmap = FALSE;
 
     if (free_old_bitmap)
+    {
+      /* copy image filename from old to new standard sized bitmap */
+      bitmaps[IMG_BITMAP_STANDARD]->source_filename =
+       getStringCopy(old_bitmap->source_filename);
+
       FreeBitmap(old_bitmap);
+    }
   }
   else
   {