src/SDL_compat.c
changeset 1897 c2a27da60b18
parent 1895 c121d94672cb
child 1907 06c27a737b7a
--- a/src/SDL_compat.c	Mon Jul 10 21:23:51 2006 +0000
+++ b/src/SDL_compat.c	Wed Jul 12 06:39:26 2006 +0000
@@ -442,7 +442,8 @@
     }
 
     /* Create a renderer for the window */
-    if (SDL_CreateRenderer(SDL_VideoWindow, -1, 0) < 0) {
+    if (SDL_CreateRenderer(SDL_VideoWindow, -1, SDL_Renderer_SingleBuffer) <
+        0) {
         return NULL;
     }
 
@@ -517,6 +518,7 @@
 
     /* Clear the surface for display */
     SDL_FillRect(SDL_PublicSurface, NULL, 0);
+    SDL_UpdateRect(SDL_PublicSurface, 0, 0, 0, 0);
 
     /* We're finally done! */
     return SDL_PublicSurface;
@@ -617,21 +619,11 @@
     if (screen) {
         SDL_Rect rect;
 
-        /* Perform some checking */
-        if (w == 0)
-            w = screen->w;
-        if (h == 0)
-            h = screen->h;
-        if ((int) (x + w) > screen->w)
-            return;
-        if ((int) (y + h) > screen->h)
-            return;
-
         /* Fill the rectangle */
-        rect.x = (Sint16) x;
-        rect.y = (Sint16) y;
-        rect.w = (Uint16) w;
-        rect.h = (Uint16) h;
+        rect.x = (int) x;
+        rect.y = (int) y;
+        rect.w = (int) (w ? w : screen->w);
+        rect.h = (int) (h ? h : screen->h);
         SDL_UpdateRects(screen, 1, &rect);
     }
 }