Parcourir la source

Properly cleanup framebuffer

Ivan Epifanov il y a 4 ans
Parent
commit
10038228f9
1 fichiers modifiés avec 1 ajouts et 6 suppressions
  1. 1 6
      src/video/vita/SDL_vitaframebuffer.c

+ 1 - 6
src/video/vita/SDL_vitaframebuffer.c

@@ -75,12 +75,7 @@ int VITA_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, vo
     );
 
     // memset the buffer to black
-    for (int y = 0; y < SCREEN_H; y++) {
-        unsigned int *row = (unsigned int *)data->buffer + y * SCREEN_W;
-        for (int x = 0; x < SCREEN_W; x++) {
-            row[x] = 0x000000FF;
-        }
-    }
+    SDL_memset(data->buffer, 0x0, SCREEN_W*SCREEN_H*4);
 
     SDL_memset(&framebuf, 0x00, sizeof(SceDisplayFrameBuf));
     framebuf.size        = sizeof(SceDisplayFrameBuf);