Fix a bug where FIFO recording could not work.

Example (in step by step explanation):

1. Run Dolphin.

2. Go to Tools -> Fifo Player

3. Go to the Record tab and hit record and then stop without a game loaded.

The button is now disabled and will not become active again for the whole time that Dolphin is running. Dolphin must be closed and then re-opened in order to use it again. This fixes that.

I've tested it with multiple conditions to make sure this doesn't beef anything else related to the Fifo Player.

ie)

- Record then Stop without a game loaded (multiple times)
- Record then Stop with a game loaded (multiple times, as well as testing playback. All of which work fine).
This commit is contained in:
lioncash 2013-05-01 09:05:37 -04:00
parent 2c7ed2a793
commit 62065be788
1 changed files with 5 additions and 5 deletions

View File

@ -34,8 +34,8 @@ FifoPlayerDlg::FifoPlayerDlg(wxWindow * const parent) :
{ {
CreateGUIControls(); CreateGUIControls();
sMutex.lock(); sMutex.lock();
m_EvtHandler = GetEventHandler(); m_EvtHandler = GetEventHandler();
sMutex.unlock(); sMutex.unlock();
FifoPlayer::GetInstance().SetFileLoadedCallback(FileLoaded); FifoPlayer::GetInstance().SetFileLoadedCallback(FileLoaded);
@ -65,7 +65,7 @@ FifoPlayerDlg::~FifoPlayerDlg()
FifoPlayer::GetInstance().SetFrameWrittenCallback(NULL); FifoPlayer::GetInstance().SetFrameWrittenCallback(NULL);
sMutex.lock(); sMutex.lock();
m_EvtHandler = NULL; m_EvtHandler = NULL;
sMutex.unlock(); sMutex.unlock();
} }
@ -407,8 +407,8 @@ void FifoPlayerDlg::OnRecordStop(wxCommandEvent& WXUNUSED(event))
// Then stop recording // Then stop recording
recorder.StopRecording(); recorder.StopRecording();
// and disable the button to stop recording // and change the button label accordingly.
m_RecordStop->Disable(); m_RecordStop->SetLabel(_("Record"));
} }
else // Recorder is actually about to start recording else // Recorder is actually about to start recording
{ {