removed unnecessary screen redraws when waiting for events to continue
[rocksndiamonds.git] / src / screens.c
index fe814ec765b5ddeea6e2e19e25f03cc21369a1e4..6838dc9540ab8b3ec1e695091e7690c12a32eee8 100644 (file)
@@ -928,10 +928,10 @@ static int getTitleSound(struct TitleControlInfo *tci)
   int sound_local = base + nr;
 
 #if 0
-  printf("::: %d, %d, %d: %d ['%s'], %d ['%s']\n",
-        nr, initial, is_image,
-        sound_global, getSoundListEntry(sound_global)->filename,
-        sound_local, getSoundListEntry(sound_local)->filename);
+  Debug("screens:getTitleSound", "%d, %d, %d: %d ['%s'], %d ['%s']",
+       nr, initial, is_image,
+       sound_global, getSoundListEntry(sound_global)->filename,
+       sound_local, getSoundListEntry(sound_local)->filename);
 #endif
 
   if (!strEqual(getSoundListEntry(sound_local)->filename, UNDEFINED_FILENAME))
@@ -958,10 +958,10 @@ static int getTitleMusic(struct TitleControlInfo *tci)
   int music_local = base + nr;
 
 #if 0
-  printf("::: %d, %d, %d: %d ['%s'], %d ['%s']\n",
-        nr, initial, is_image,
-        music_global, getMusicListEntry(music_global)->filename,
-        music_local, getMusicListEntry(music_local)->filename);
+  Debug("screens:getTitleMusic", "%d, %d, %d: %d ['%s'], %d ['%s']",
+       nr, initial, is_image,
+       music_global, getMusicListEntry(music_global)->filename,
+       music_local, getMusicListEntry(music_local)->filename);
 #endif
 
   if (!strEqual(getMusicListEntry(music_local)->filename, UNDEFINED_FILENAME))
@@ -1326,10 +1326,11 @@ static boolean insideTextPosRect(struct TextPosInfo *rect, int x, int y)
   int rect_y = ALIGNED_TEXT_YPOS(rect);
 
 #if 0
-  printf("::: insideTextPosRect: (%d, %d), (%d, %d) [%d, %d] (%d, %d) => %d\n",
-        x, y, rect_x, rect_y, rect->x, rect->y, rect->width, rect->height,
-        (x >= rect_x && x < rect_x + rect->width &&
-         y >= rect_y && y < rect_y + rect->height));
+  Debug("screens:insideTextPosRect",
+       "(%d, %d), (%d, %d) [%d, %d] (%d, %d) => %d",
+       x, y, rect_x, rect_y, rect->x, rect->y, rect->width, rect->height,
+       (x >= rect_x && x < rect_x + rect->width &&
+        y >= rect_y && y < rect_y + rect->height));
 #endif
 
   return (x >= rect_x && x < rect_x + rect->width &&
@@ -3691,6 +3692,10 @@ static void DrawInfoScreen_Version(void)
 
   DrawTextF(xstart1, ystart, font_head, "Source date");
   DrawTextF(xstart2, ystart, font_text, getSourceDateString());
+  ystart += ystep_line;
+
+  DrawTextF(xstart1, ystart, font_head, "Commit hash");
+  DrawTextF(xstart2, ystart, font_text, getSourceHashString());
   ystart += ystep_para;
 
   DrawTextF(xstart1, ystart, font_head, "Library");
@@ -5951,10 +5956,10 @@ static void execSetupTouch(void)
 static void execSetupArtwork(void)
 {
 #if 0
-  printf("::: '%s', '%s', '%s'\n",
-        artwork.gfx_current->subdir,
-        artwork.gfx_current->fullpath,
-        artwork.gfx_current->basepath);
+  Debug("screens:execSetupArtwork", "'%s', '%s', '%s'",
+       artwork.gfx_current->subdir,
+       artwork.gfx_current->fullpath,
+       artwork.gfx_current->basepath);
 #endif
 
   setup.graphics_set = artwork.gfx_current->identifier;
@@ -7605,9 +7610,9 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
 
 #if DEBUG_JOYSTICKS
   // print info about the joystick we are watching
-  Error(ERR_DEBUG, "watching joystick %d: (%s)\n",
+  Debug("joystick", "watching joystick %d: (%s)",
        SDL_JoystickInstanceID(joystick), name);
-  Error(ERR_DEBUG, "joystick has %d axes, %d hats, %d balls, and %d buttons\n",
+  Debug("joystick", "joystick has %d axes, %d hats, %d balls, and %d buttons",
        SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick),
        SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick));
 #endif
@@ -7864,7 +7869,7 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick)
   if (success)
   {
 #if DEBUG_JOYSTICKS
-    Error(ERR_DEBUG, "New game controller mapping:\n\n%s\n\n", mapping);
+    Debug("joystick", "New game controller mapping:\n\n%s\n\n", mapping);
 #endif
 
     // activate mapping for this game
@@ -8713,7 +8718,7 @@ static void CreateScreenMenubuttons(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }
@@ -8781,7 +8786,7 @@ static void CreateScreenScrollbuttons(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }
@@ -8862,7 +8867,7 @@ static void CreateScreenScrollbars(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }
@@ -8908,7 +8913,7 @@ static void CreateScreenTextInputGadgets(void)
                      GDI_END);
 
     if (gi == NULL)
-      Error(ERR_EXIT, "cannot create gadget");
+      Fail("cannot create gadget");
 
     screen_gadget[id] = gi;
   }