From b565618442cb75fc686d99a9113d1824d591008a Mon Sep 17 00:00:00 2001 From: skidau Date: Mon, 8 Nov 2010 08:51:30 +0000 Subject: [PATCH] Removed the wait for swap when XFB is used. This fixes flickering in "Fragile Dreams" and "Another Code R". Fixes issue 3466. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6360 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX11/Src/main.cpp | 8 +------- Source/Plugins/Plugin_VideoDX9/Src/main.cpp | 8 +------- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp index 3491fde2e1..699636bc4c 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp @@ -330,13 +330,7 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) { if (s_PluginInitialized && g_ActiveConfig.bUseXFB) { - if (g_VideoInitialize.bOnThread) - { - while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown) - //Common::SleepCurrentThread(1); - Common::YieldCPU(); - } - else + if (!g_VideoInitialize.bOnThread) VideoFifo_CheckSwapRequest(); s_beginFieldArgs.xfbAddr = xfbAddr; s_beginFieldArgs.field = field; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp index 452c9dbfec..aceb6b674e 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp @@ -361,13 +361,7 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) { if (s_PluginInitialized && g_ActiveConfig.bUseXFB) { - if (g_VideoInitialize.bOnThread) - { - while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown) - //Common::SleepCurrentThread(1); - Common::YieldCPU(); - } - else + if (!g_VideoInitialize.bOnThread) VideoFifo_CheckSwapRequest(); s_beginFieldArgs.xfbAddr = xfbAddr; s_beginFieldArgs.field = field; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 9b8243eb3d..002b88458f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -387,13 +387,7 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight) { if (s_PluginInitialized && g_ActiveConfig.bUseXFB) { - if (g_VideoInitialize.bOnThread) - { - while (Common::AtomicLoadAcquire(s_swapRequested) && !s_FifoShuttingDown) - //Common::SleepCurrentThread(1); - Common::YieldCPU(); - } - else + if (!g_VideoInitialize.bOnThread) VideoFifo_CheckSwapRequest(); s_beginFieldArgs.xfbAddr = xfbAddr; s_beginFieldArgs.field = field;