コード例 #1
0
ファイル: Instance.cs プロジェクト: mattweb28/pspplayer
        private void RuntimeThread()
        {
            try
            {
                if (_switchToXmb == true)
                {
                    this.SwitchToXmb();
                }

                if (_video != null)
                {
                    _video.Resume();
                }

                while (_shutDown == false)
                {
                    switch (_state)
                    {
                    case InstanceState.Ended:
                    case InstanceState.Idle:
                    case InstanceState.Paused:
                    case InstanceState.Crashed:
                        _stateChangeEvent.WaitOne();
                        break;

                    case InstanceState.Debugging:
                        // TODO: debugging runtime loop code
                        break;

                    case InstanceState.Running:
                        while (_bios.Game == null)
                        {
                            // Wait for a game to get set
                            _bios.WaitUntilLoaded();
                        }
                        // Run the kernel
                        _bios.Execute();
                        break;
                    }
                }
            }
            catch (ThreadAbortException)
            {
            }
            catch (ThreadInterruptedException)
            {
            }
        }