Allow for self shutdown from video plugins.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2611 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
044637218e
commit
c674e6330f
|
@ -119,6 +119,12 @@ void Fifo_ExitLoop()
|
||||||
#endif
|
#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)
|
void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,7 @@ void Fifo_Shutdown();
|
||||||
// These two are for dual core mode only.
|
// These two are for dual core mode only.
|
||||||
void Fifo_EnterLoop(const SVideoInitialize &video_initialize);
|
void Fifo_EnterLoop(const SVideoInitialize &video_initialize);
|
||||||
void Fifo_ExitLoop();
|
void Fifo_ExitLoop();
|
||||||
|
void Fifo_ExitLoopNonBlocking();
|
||||||
|
|
||||||
void Fifo_DoState(PointerWrap &f);
|
void Fifo_DoState(PointerWrap &f);
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "EmuWindow.h"
|
#include "EmuWindow.h"
|
||||||
|
#include "Fifo.h"
|
||||||
|
|
||||||
namespace EmuWindow
|
namespace EmuWindow
|
||||||
{
|
{
|
||||||
|
@ -52,6 +53,7 @@ namespace EmuWindow
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
|
Fifo_ExitLoopNonBlocking();
|
||||||
Shutdown();
|
Shutdown();
|
||||||
// Simple hack to easily exit without stopping. Hope to fix the stopping errors soon.
|
// Simple hack to easily exit without stopping. Hope to fix the stopping errors soon.
|
||||||
ExitProcess(0);
|
ExitProcess(0);
|
||||||
|
|
Loading…
Reference in New Issue