/[pcsx2_0.9.7]/trunk/pcsx2/System/SysThreads.h
ViewVC logotype

Diff of /trunk/pcsx2/System/SysThreads.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 29  typedef SafeArray<u8> VmStateBuffer; Line 29  typedef SafeArray<u8> VmStateBuffer;
29  //  SysThreadBase  //  SysThreadBase
30  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
31    
32  class SysThreadBase : public PersistentThread  class SysThreadBase : public pxThread
33  {  {
34          typedef PersistentThread _parent;          typedef pxThread _parent;
35    
36  public:  public:
37          // Important: The order of these enumerations matters!  Optimized tests are used for both          // Important: The order of these enumerations matters!  Optimized tests are used for both
# Line 95  public: Line 95  public:
95          }          }
96    
97          bool IsClosed() const { return !IsOpen(); }          bool IsClosed() const { return !IsOpen(); }
           
98          bool IsPaused() const { return !IsRunning() || (m_ExecMode <= ExecMode_Paused); }          bool IsPaused() const { return !IsRunning() || (m_ExecMode <= ExecMode_Paused); }
99    
100            bool IsClosing() const
101            {
102                    return !IsRunning() || (m_ExecMode <= ExecMode_Closed) || (m_ExecMode == ExecMode_Closing);
103            }
104    
105          bool HasPendingStateChangeRequest() const          bool HasPendingStateChangeRequest() const
106          {          {
107                  ExecutionMode mode = m_ExecMode;                  return m_ExecMode >= ExecMode_Closing;
                 return (mode == ExecMode_Closing) || (mode == ExecMode_Pausing);  
108          }          }
109    
110          ExecutionMode GetExecutionMode() const { return m_ExecMode; }          ExecutionMode GetExecutionMode() const { return m_ExecMode; }
# Line 119  protected: Line 122  protected:
122          // Resume() has a lot of checks and balances to prevent re-entrance and race conditions.          // Resume() has a lot of checks and balances to prevent re-entrance and race conditions.
123          virtual void OnResumeReady() {}          virtual void OnResumeReady() {}
124    
125          virtual void StateCheckInThread();          virtual bool StateCheckInThread();
126          virtual void OnCleanupInThread();          virtual void OnCleanupInThread();
127          virtual void OnStartInThread();          virtual void OnStartInThread();
128    
# Line 184  public: Line 187  public:
187          virtual void Cancel( bool isBlocking=true );          virtual void Cancel( bool isBlocking=true );
188          virtual bool Cancel( const wxTimeSpan& timeout );          virtual bool Cancel( const wxTimeSpan& timeout );
189    
190          virtual void StateCheckInThread();          virtual bool StateCheckInThread();
191          virtual void VsyncInThread();          virtual void VsyncInThread();
192          virtual void PostVsyncToUI()=0;          virtual void GameStartingInThread();
193    
194          virtual void ApplySettings( const Pcsx2Config& src );          virtual void ApplySettings( const Pcsx2Config& src );
195          virtual void UploadStateCopy( const VmStateBuffer& copy );          virtual void UploadStateCopy( const VmStateBuffer& copy );

Legend:
Removed from v.31  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22