From 54068a57b058a62d81a5c9237ade1065d88bfc4a Mon Sep 17 00:00:00 2001 From: gendlin <108626604+gendlin@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:58:55 -0500 Subject: [PATCH] Clean up and match Chocolate (#2041) --- src/i_video.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/i_video.c b/src/i_video.c index 2818f10b..b42ea5e6 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -657,11 +657,13 @@ void I_StartFrame(void) static void UpdateRender(void) { + // Blit from the paletted 8-bit screen buffer to the intermediate + // 32-bit RGBA buffer and update the intermediate texture with the + // contents of the RGBA buffer. + SDL_LockTexture(texture, &blit_rect, &argbbuffer->pixels, - &argbbuffer->pitch); - + &argbbuffer->pitch); SDL_LowerBlit(screenbuffer, &blit_rect, argbbuffer, &blit_rect); - SDL_UnlockTexture(texture); SDL_RenderClear(renderer); @@ -1767,7 +1769,7 @@ static void CreateSurfaces(int w, int h) // [FG] create intermediate ARGB frame buffer argbbuffer = SDL_CreateRGBSurfaceWithFormatFrom( - NULL, w, h, 8, 0, SDL_PIXELFORMAT_ARGB8888); + NULL, w, h, 0, 0, SDL_PIXELFORMAT_ARGB8888); I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));