Add missing SDL_Flip() calls
authorMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 30 Jun 2014 03:07:39 +0000 (03:07 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 30 Jun 2014 03:07:39 +0000 (03:07 +0000)
mmsoftware/mystic_ships/client/src/main.c
mmsoftware/mystic_ships/client/src/screen.c

index 8ac6d5e..b73a1db 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.9 2014/06/26 03:46:37 mmondor Exp $ */
+/* $Id: main.c,v 1.10 2014/06/30 03:07:39 mmondor Exp $ */
 
 /*
  * Copyright (c) 2006, Matthew Mondor
@@ -227,6 +227,7 @@ main(int argc, char **argv)
         */
        font_blit_string(font, 16, 16, "Connecting to server...",
            0x00, 0xff, 0x00, 0xff);
+       (void) SDL_Flip(screen_surface);
        {
                struct msg_connect      *cmsg;
 
index 8c9175e..23eefe7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.5 2014/06/30 01:50:14 mmondor Exp $ */
+/* $Id: screen.c,v 1.6 2014/06/30 03:07:39 mmondor Exp $ */
 
 /*
  * Copyright (c) 2006, 2014, Matthew Mondor
@@ -95,8 +95,12 @@ screen_error(const char *fmt, ...)
        va_end(ap);
 
        if (error_font != NULL) {
-               font_blit_string(error_font, 32, 32, buf,
-                   0xff, 0x0a, 0x0a, 0xff);
+               (void) SDL_FillRect(screen_surface, NULL, 0x00a0a0a0);
+               font_blit_string(error_font, 16, 16, "ERROR",
+                   0x80, 0x00, 0x00, 0xff);
+               font_blit_string(error_font, 16, 32, buf,
+                   0x80, 0x00, 0x00, 0xff);
+               (void) SDL_Flip(screen_surface);
                SDL_Delay(3000);
        }
        (void) fprintf(stderr, "%s\n", buf);