mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
all this to make stop work without message passing
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@744 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -29,6 +29,8 @@ extern u32 g_pVideoData;
|
||||
FifoReader fifo;
|
||||
#endif
|
||||
|
||||
bool fifoStateRun = true;
|
||||
|
||||
// STATE_TO_SAVE
|
||||
static u8 *videoBuffer;
|
||||
static int size = 0;
|
||||
@ -46,11 +48,17 @@ void Fifo_Init()
|
||||
#ifndef DATAREADER_INLINE
|
||||
fifo.Init(videoBuffer, videoBuffer); //zero length. there is no data yet.
|
||||
#endif
|
||||
fifoStateRun = true;
|
||||
}
|
||||
|
||||
void Fifo_Shutdown()
|
||||
{
|
||||
FreeMemoryPages(videoBuffer, FIFO_SIZE);
|
||||
fifoStateRun = false;
|
||||
}
|
||||
|
||||
void Fifo_Stop() {
|
||||
fifoStateRun = false;
|
||||
}
|
||||
|
||||
u32 FAKE_GetFifoStartPtr()
|
||||
@ -161,7 +169,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||
#endif
|
||||
|
||||
// TODO(ector): Don't peek so often!
|
||||
while (video_initialize.pPeekMessages())
|
||||
while (fifoStateRun || video_initialize.pPeekMessages())
|
||||
{
|
||||
#if defined(THREAD_VIDEO_WAKEUP_ONIDLE) && defined(_WIN32)
|
||||
if (MsgWaitForMultipleObjects(1, &hEventOnIdle, FALSE, 1L, QS_ALLEVENTS) == WAIT_ABANDONED)
|
||||
|
@ -71,6 +71,7 @@ void Fifo_Init();
|
||||
void Fifo_Shutdown();
|
||||
void Fifo_EnterLoop(const SVideoInitialize &video_initialize);
|
||||
void Fifo_DoState(PointerWrap &f);
|
||||
void Fifo_Stop();
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user