From c85510130bd344725212adca24b9863820c007ff Mon Sep 17 00:00:00 2001 From: death2droid Date: Sat, 23 May 2009 10:04:19 +0000 Subject: [PATCH] Clean up of the flicker fix. (People don't seem to realise im not the original author of the hack) Removed the code i left before just in case someone wanted to fix it. As at the moment the hack works so it's fine for now plus glReadPixels is a bugger to work with(For me). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3278 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index d77be46682..14f57ac4a3 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -1182,21 +1182,13 @@ bool Renderer::IsBlack() char pixels [2]; short color[] = {GL_RED, GL_GREEN, GL_BLUE}; - for(int x = 0; x < (int) OpenGL_GetBackbufferHeight(); x++) + for (int i = 0; i < 2;i++) { - for(int y = 0; y < (int) OpenGL_GetBackbufferWidth(); y++) - { - for (int i = 0; i < 2;i++) - { -//glReadPixels(x, y, 1, 1, color[i], GL_BYTE, &pixels[i]); -//Using the x and y causes OpenGL not to display anything so temporarly it uses the 500 and 300 inplace of them(Still works fine) - glReadPixels(500, 300, 1, 1, color[i], GL_BYTE, &pixels[i]); - if(pixels[i] != 0) - return false; - else - return true; - } - } + glReadPixels(500, 300, 1, 1, GL_RGB, GL_BYTE, &pixels[i]); + if(pixels[i] != 0) + return false; + else + return true; } }