From 0ae9e8013b184627894ff4f1b863a937a0bd2d9a Mon Sep 17 00:00:00 2001 From: Bart Trzynadlowski Date: Thu, 28 Apr 2016 01:27:35 +0000 Subject: [PATCH] Fixed polygon header bit analysis code: was forgetting to swap GL buffer back to retrieve pixels from last rendered frame --- Src/OSD/SDL/Main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index 45b4869..8d5b2f3 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -471,8 +471,10 @@ static void TestPolygonHeaderBits(IEmulator *Emu) if ((unknownPolyBits[idx] & mask)) { Emu->RenderFrame(); + SDL_GL_SwapBuffers(); // swap the buffer second time to get back rendered frame std::string file = Util::Format() << "Analysis/" << GetFileBaseName(s_gfxStatePath) << "." << idx << "_" << Util::Hex(mask) << ".bmp"; SaveFrameBuffer(file); + SDL_GL_SwapBuffers(); // show some visual feedback } } }