From c74de667988216e668fcae6ed4983201159088b0 Mon Sep 17 00:00:00 2001 From: oxmox Date: Sat, 22 Apr 2023 09:47:45 +0200 Subject: [PATCH] remove buggy DoomBytesPerPixel == 3 code --- src/doompanning.cc | 32 +------------------ .../linuxdoom-1.10/ib_video/ib_video_nng.c | 7 +--- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/doompanning.cc b/src/doompanning.cc index ebe4378..8575f7d 100644 --- a/src/doompanning.cc +++ b/src/doompanning.cc @@ -23,10 +23,7 @@ #include "dp_util.hpp" #include "doomlib.hpp" -#if DoomBytesPerPixel == 3 -// FIXME: don't use, it's buggy -static const u32 DoomSdlTexturePixelFormat = SDL_PIXELFORMAT_RGB888; -#elif DoomBytesPerPixel == 4 +#if DoomBytesPerPixel == 4 static const u32 DoomSdlTexturePixelFormat = SDL_PIXELFORMAT_ARGB8888; #else #error Unhandled DoomBytesPerPixel value. Which SDL_PIXELFORMAT to use? @@ -340,35 +337,8 @@ void do_networking(ControllerContext &ctx) #endif - #if 0 - // FIXME: buggy. black screen with tiny bar on top - //log_trace("Texture update for doom (pid=%d, texture=%p)", ds.id, ds.texture); - - u8 *destPixels = nullptr; - int texturePitch = 0; - - if (SDL_LockTexture(ds.texture, nullptr, reinterpret_cast(&destPixels), &texturePitch)) - dp_sdl_fatal("SDL_LockTexture"); - - // When using 3 bytes per pixel (960 bytes per row), SDL yields - // a pitch of 1280 on my machine. This is likely done to get - // good alignment. - assert(DoomFramePitch <= texturePitch); - - for (size_t row=0; row