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