rnd-20021123-1-src
[rocksndiamonds.git] / src / libgame / system.c
index 432787c2bdf4a5c04123e97b379846709775ef97..3603dbe83c86563741766c702e1dab37bfc0124a 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Artsoft Retro-Game Library                               *
 *----------------------------------------------------------*
-* (c) 1994-2001 Artsoft Entertainment                      *
+* (c) 1994-2002 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
@@ -94,6 +94,9 @@ void InitPlatformDependantStuff(void)
 
 #if !defined(PLATFORM_UNIX)
   program.userdata_directory = "userdata";
+#endif
+
+#if defined(PLATFORM_MSDOS)
   initErrorFile();
 #endif
 
@@ -105,7 +108,7 @@ void InitPlatformDependantStuff(void)
 
 void ClosePlatformDependantStuff(void)
 {
-#if !defined(PLATFORM_UNIX)
+#if defined(PLATFORM_MSDOS)
   dumpErrorFile();
 #endif
 }
@@ -718,7 +721,8 @@ void ReloadCustomImage(Bitmap *bitmap, char *basename)
   if (bitmap->width != new_bitmap->width ||
       bitmap->height != new_bitmap->height)
   {
-    Error(ERR_WARN, "ReloadCustomImage: new image has wrong dimensions");
+    Error(ERR_WARN, "ReloadCustomImage: new image '%s' has wrong dimensions",
+         filename);
     FreeBitmap(new_bitmap);
     return;
   }
@@ -822,7 +826,9 @@ inline Key GetEventKey(KeyEvent *event, boolean with_modifiers)
         (int)SDL_GetModState());
 #endif
 
-  if (with_modifiers && event->keysym.unicode != 0)
+  if (with_modifiers &&
+      event->keysym.unicode > 0x0000 &&
+      event->keysym.unicode < 0x2000)
     return event->keysym.unicode;
   else
     return event->keysym.sym;