mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Core Stop and Start: Added alternative separate thread timer/loop based waiting, instead of same thread loop waiting. You can try it with the SETUP_TIMER_WAITING option in Setup.h.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2375 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -33,6 +33,15 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
|
||||
// -----------------------------------------
|
||||
#ifdef SETUP_TIMER_WAITING
|
||||
// -----------------
|
||||
typedef void (*EventCallBack)(void);
|
||||
#endif
|
||||
// ----------------------
|
||||
|
||||
|
||||
namespace Common
|
||||
{
|
||||
class CriticalSection
|
||||
@ -78,6 +87,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
@ -89,6 +99,20 @@ public:
|
||||
void Set();
|
||||
void Wait();
|
||||
|
||||
// -----------------------------------------
|
||||
#ifdef SETUP_TIMER_WAITING
|
||||
// -----------------
|
||||
bool TimerWait(EventCallBack WaitCB, int Id = 0, bool OptCondition = true);
|
||||
bool DoneWait();
|
||||
void SetTimer();
|
||||
bool DoneWaiting;
|
||||
bool StartWait;
|
||||
int Id;
|
||||
HANDLE hTimer;
|
||||
HANDLE hTimerQueue;
|
||||
#endif
|
||||
// ---------------------------
|
||||
|
||||
private:
|
||||
#ifdef _WIN32
|
||||
HANDLE m_hEvent;
|
||||
|
Reference in New Issue
Block a user