Remove the flickering hack by Orbb(From the Dolphin-Emu forum)

I think i got the most negatives in a row for the SVN :(

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3279 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid
2009-05-23 12:35:16 +00:00
parent c85510130b
commit e97315d0ff
5 changed files with 2 additions and 43 deletions

View File

@ -1177,22 +1177,6 @@ void Renderer::DrawDebugText()
Renderer::RenderText(debugtext_buffer, 21, 21, 0xDD000000);
Renderer::RenderText(debugtext_buffer, 20, 20, 0xFF00FFFF);
}
bool Renderer::IsBlack()
{
char pixels [2];
short color[] = {GL_RED, GL_GREEN, GL_BLUE};
for (int i = 0; i < 2;i++)
{
glReadPixels(500, 300, 1, 1, GL_RGB, GL_BYTE, &pixels[i]);
if(pixels[i] != 0)
return false;
else
return true;
}
}
// -------------------------------------------------------------------------------------------------------
// We can now draw whatever we want on top of the picture. Then we copy the final picture to the output.
// -------------------------------------------------------------------------------------------------------
@ -1233,19 +1217,9 @@ void Renderer::SwapBuffers()
}
#endif
// Copy the rendered frame to the real window
// [ fix for Fragile by kamui_kun ...
// TODO get the fix to read the whole screen not just 5 pixels
if (g_Config.bRemoveFlicker)
{
BOOL pass = FALSE;
if(!Renderer::IsBlack())
OpenGL_SwapBuffers();
}
else
{
OpenGL_SwapBuffers();
}
OpenGL_SwapBuffers();
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);