]> git.0x19.co - doomgeneric-snom360/commitdiff
unnecessary memcpy removed
authorozkl <ozkl@users.noreply.github.com>
Sat, 16 May 2020 14:56:17 +0000 (17:56 +0300)
committerozkl <ozkl@users.noreply.github.com>
Sat, 16 May 2020 14:56:17 +0000 (17:56 +0300)
doomgeneric/i_video.c

index cd4cd5b9a342c98af7ecb722aec9d44070038b46..bf6303565ad7b1ef89eedb36b7dfd60bb2eee6df 100644 (file)
@@ -89,7 +89,6 @@ void I_GetEvent(void);
 // The screen buffer; this is modified to draw things to the screen
 
 byte *I_VideoBuffer = NULL;
-byte *I_VideoBuffer_FB = NULL;
 
 // If true, game is running as a screensaver
 
@@ -221,7 +220,6 @@ void I_InitGraphics (void)
 
     /* Allocate screen to draw to */
        I_VideoBuffer = (byte*)Z_Malloc (SCREENWIDTH * SCREENHEIGHT, PU_STATIC, NULL);  // For DOOM to draw on
-       I_VideoBuffer_FB = (byte*)malloc(s_Fb.xres * s_Fb.yres * (s_Fb.bits_per_pixel/8));     // For a single write() syscall to fbdev
 
        screenvisible = true;
 
@@ -232,7 +230,6 @@ void I_InitGraphics (void)
 void I_ShutdownGraphics (void)
 {
        Z_Free (I_VideoBuffer);
-       free(I_VideoBuffer_FB);
 }
 
 void I_StartFrame (void)
@@ -270,7 +267,7 @@ void I_FinishUpdate (void)
 
     /* DRAW SCREEN */
     line_in  = (unsigned char *) I_VideoBuffer;
-    line_out = (unsigned char *) I_VideoBuffer_FB;
+    line_out = (unsigned char *) DG_ScreenBuffer;
 
     y = SCREENHEIGHT;
 
@@ -294,8 +291,6 @@ void I_FinishUpdate (void)
         line_in += SCREENWIDTH;
     }
 
-       memcpy(DG_ScreenBuffer, I_VideoBuffer_FB, (SCREENHEIGHT * fb_scaling * (s_Fb.bits_per_pixel / 8)) * s_Fb.xres);
-
        DG_DrawFrame();
 }