diff options
| author | XTra.KrazzY <XTra.KrazzY@gmail.com> | 2009-03-07 23:34:16 +0000 |
|---|---|---|
| committer | XTra.KrazzY <XTra.KrazzY@gmail.com> | 2009-03-07 23:34:16 +0000 |
| commit | c674e6330fb780df8e4e4d795085eff346ebe5f2 (patch) | |
| tree | 0c29cf0daf4ed82dde65ed91f159d75b78fafa08 | |
| parent | 044637218eaa59fdff2e7e0b3df48d89d1309cae (diff) | |
Allow for self shutdown from video plugins.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2611 8ced0084-cf51-0410-be5f-012b33b47a6e
| -rw-r--r-- | Source/Core/VideoCommon/Src/Fifo.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/Fifo.h | 1 | ||||
| -rw-r--r-- | Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 8a502b5ef2..2dfd7ffa2e 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -119,6 +119,12 @@ void Fifo_ExitLoop() #endif } +// May be executed from any thread, even the graphics thread. +// Created to allow for self shutdown. +void Fifo_ExitLoopNonBlocking() { + fifoStateRun = false; +} + // void Fifo_EnterLoop(const SVideoInitialize &video_initialize) { diff --git a/Source/Core/VideoCommon/Src/Fifo.h b/Source/Core/VideoCommon/Src/Fifo.h index c0148ef99c..b71e3155d6 100644 --- a/Source/Core/VideoCommon/Src/Fifo.h +++ b/Source/Core/VideoCommon/Src/Fifo.h @@ -33,6 +33,7 @@ void Fifo_Shutdown(); // These two are for dual core mode only. void Fifo_EnterLoop(const SVideoInitialize &video_initialize); void Fifo_ExitLoop(); +void Fifo_ExitLoopNonBlocking(); void Fifo_DoState(PointerWrap &f); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp index f9495cea44..4f36f675fb 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp @@ -5,6 +5,7 @@ #include "Config.h" #include "main.h" #include "EmuWindow.h" +#include "Fifo.h" namespace EmuWindow { @@ -52,6 +53,7 @@ namespace EmuWindow break; case WM_CLOSE: + Fifo_ExitLoopNonBlocking(); Shutdown(); // Simple hack to easily exit without stopping. Hope to fix the stopping errors soon. ExitProcess(0); |
