TAS: Recording now has GUI!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4026 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7ed4b06e48
commit
fb507ce676
|
@ -84,7 +84,7 @@ void FrameSkipping();
|
||||||
|
|
||||||
void ModifyController(SPADStatus *PadStatus, int controllerID);
|
void ModifyController(SPADStatus *PadStatus, int controllerID);
|
||||||
|
|
||||||
void BeginRecordingInput(const char *filename);
|
void BeginRecordingInput(const char *filename, int controllers);
|
||||||
void RecordInput(SPADStatus *PadStatus, int controllerID);
|
void RecordInput(SPADStatus *PadStatus, int controllerID);
|
||||||
void EndRecordingInput();
|
void EndRecordingInput();
|
||||||
|
|
||||||
|
|
|
@ -235,6 +235,7 @@ EVT_MENU(IDM_HELPGOOGLECODE, CFrame::OnHelp)
|
||||||
EVT_MENU(IDM_HELPABOUT, CFrame::OnHelp)
|
EVT_MENU(IDM_HELPABOUT, CFrame::OnHelp)
|
||||||
EVT_MENU(wxID_REFRESH, CFrame::OnRefresh)
|
EVT_MENU(wxID_REFRESH, CFrame::OnRefresh)
|
||||||
EVT_MENU(IDM_PLAY, CFrame::OnPlay)
|
EVT_MENU(IDM_PLAY, CFrame::OnPlay)
|
||||||
|
EVT_MENU(IDM_RECORD, CFrame::OnRecord)
|
||||||
EVT_MENU(IDM_STOP, CFrame::OnStop)
|
EVT_MENU(IDM_STOP, CFrame::OnStop)
|
||||||
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
||||||
EVT_MENU(IDM_CONFIG_MAIN, CFrame::OnConfigMain)
|
EVT_MENU(IDM_CONFIG_MAIN, CFrame::OnConfigMain)
|
||||||
|
|
|
@ -158,6 +158,7 @@ class CFrame : public wxFrame
|
||||||
void OnBootDrive(wxCommandEvent& event);
|
void OnBootDrive(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnPlay(wxCommandEvent& event); // Emulation
|
void OnPlay(wxCommandEvent& event); // Emulation
|
||||||
|
void OnRecord(wxCommandEvent& event);
|
||||||
void OnChangeDisc(wxCommandEvent& event);
|
void OnChangeDisc(wxCommandEvent& event);
|
||||||
void OnStop(wxCommandEvent& event);
|
void OnStop(wxCommandEvent& event);
|
||||||
void OnScreenshot(wxCommandEvent& event);
|
void OnScreenshot(wxCommandEvent& event);
|
||||||
|
|
|
@ -129,6 +129,7 @@ void CFrame::CreateMenu()
|
||||||
// Emulation menu
|
// Emulation menu
|
||||||
wxMenu* emulationMenu = new wxMenu;
|
wxMenu* emulationMenu = new wxMenu;
|
||||||
emulationMenu->Append(IDM_PLAY, _T("&Play\tF10"));
|
emulationMenu->Append(IDM_PLAY, _T("&Play\tF10"));
|
||||||
|
emulationMenu->Append(IDM_RECORD, _T("&Start Recording"));
|
||||||
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
|
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
|
||||||
emulationMenu->Append(IDM_STOP, _T("&Stop"));
|
emulationMenu->Append(IDM_STOP, _T("&Stop"));
|
||||||
|
|
||||||
|
@ -486,6 +487,28 @@ void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED (event))
|
||||||
DoOpen(false);
|
DoOpen(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
|
||||||
|
{
|
||||||
|
wxString path = wxFileSelector(
|
||||||
|
_T("Select The Recording File"),
|
||||||
|
wxEmptyString, wxEmptyString, wxEmptyString,
|
||||||
|
wxString::Format
|
||||||
|
(
|
||||||
|
_T("Dolphin TAS Movies (*.dtm)|*.dtm|All files (%s)|%s"),
|
||||||
|
wxFileSelectorDefaultWildcardStr,
|
||||||
|
wxFileSelectorDefaultWildcardStr
|
||||||
|
),
|
||||||
|
wxFD_SAVE | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
|
||||||
|
this);
|
||||||
|
|
||||||
|
if(path.IsEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// TODO: Take controller settings from Gamecube Configuration menu
|
||||||
|
Frame::BeginRecordingInput(path.mb_str(), 1);
|
||||||
|
BootGame();
|
||||||
|
}
|
||||||
|
|
||||||
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
BootGame();
|
BootGame();
|
||||||
|
@ -532,6 +555,10 @@ void CFrame::DoStop()
|
||||||
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
||||||
if(!AskYesNo("Are you sure you want to stop the current emulation?", "Confirm", wxYES_NO))
|
if(!AskYesNo("Are you sure you want to stop the current emulation?", "Confirm", wxYES_NO))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// TODO: Show the author/description dialog here
|
||||||
|
if(Frame::IsRecordingInput())
|
||||||
|
Frame::EndRecordingInput();
|
||||||
|
|
||||||
Core::Stop();
|
Core::Stop();
|
||||||
UpdateGUI();
|
UpdateGUI();
|
||||||
|
@ -831,6 +858,7 @@ void CFrame::UpdateGUI()
|
||||||
|
|
||||||
// Emulation
|
// Emulation
|
||||||
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
|
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
|
||||||
|
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!running && !paused);
|
||||||
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
|
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
|
||||||
m_pSubMenuLoad->Enable(initialized);
|
m_pSubMenuLoad->Enable(initialized);
|
||||||
m_pSubMenuSave->Enable(initialized);
|
m_pSubMenuSave->Enable(initialized);
|
||||||
|
|
|
@ -62,6 +62,7 @@ enum
|
||||||
IDM_FRAMESKIP8,
|
IDM_FRAMESKIP8,
|
||||||
IDM_FRAMESKIP9,
|
IDM_FRAMESKIP9,
|
||||||
IDM_PLAY,
|
IDM_PLAY,
|
||||||
|
IDM_RECORD,
|
||||||
IDM_STOP,
|
IDM_STOP,
|
||||||
IDM_SCREENSHOT,
|
IDM_SCREENSHOT,
|
||||||
IDM_BROWSE,
|
IDM_BROWSE,
|
||||||
|
|
Loading…
Reference in New Issue