no sound or redraw when nothing done

This commit is contained in:
Albert Cahalan 2004-12-30 17:14:27 +00:00
parent d8c5094b11
commit 4c2962ca82

View file

@ -2459,7 +2459,7 @@ static void mainloop(void)
!disable_stamp_controls) !disable_stamp_controls)
{ {
/* Text controls! */ /* Text controls! */
int text_sound; int text_sound = -1;
if (event.button.y >= (48 * ((max / 2) + TOOLOFFSET / 2)) + 40 && if (event.button.y >= (48 * ((max / 2) + TOOLOFFSET / 2)) + 40 &&
event.button.y < (48 * ((max / 2) + TOOLOFFSET / 2)) + 40 + 48) event.button.y < (48 * ((max / 2) + TOOLOFFSET / 2)) + 40 + 48)
{ {
@ -2518,9 +2518,12 @@ static void mainloop(void)
} }
} }
} }
playsound(0, text_sound, 0); if (text_sound != -1)
draw_fonts(); {
SDL_UpdateRect(screen, WINDOW_WIDTH - 96, 0, 96, (48 * 7) + 40 + HEIGHTOFFSET); playsound(0, text_sound, 0);
draw_fonts();
SDL_UpdateRect(screen, WINDOW_WIDTH - 96, 0, 96, (48 * 7) + 40 + HEIGHTOFFSET);
}
} }