mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
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 BeginRecordingInput(const char *filename);
|
||||
void BeginRecordingInput(const char *filename, int controllers);
|
||||
void RecordInput(SPADStatus *PadStatus, int controllerID);
|
||||
void EndRecordingInput();
|
||||
|
||||
|
@ -235,6 +235,7 @@ EVT_MENU(IDM_HELPGOOGLECODE, CFrame::OnHelp)
|
||||
EVT_MENU(IDM_HELPABOUT, CFrame::OnHelp)
|
||||
EVT_MENU(wxID_REFRESH, CFrame::OnRefresh)
|
||||
EVT_MENU(IDM_PLAY, CFrame::OnPlay)
|
||||
EVT_MENU(IDM_RECORD, CFrame::OnRecord)
|
||||
EVT_MENU(IDM_STOP, CFrame::OnStop)
|
||||
EVT_MENU(IDM_SCREENSHOT, CFrame::OnScreenshot)
|
||||
EVT_MENU(IDM_CONFIG_MAIN, CFrame::OnConfigMain)
|
||||
|
@ -158,6 +158,7 @@ class CFrame : public wxFrame
|
||||
void OnBootDrive(wxCommandEvent& event);
|
||||
|
||||
void OnPlay(wxCommandEvent& event); // Emulation
|
||||
void OnRecord(wxCommandEvent& event);
|
||||
void OnChangeDisc(wxCommandEvent& event);
|
||||
void OnStop(wxCommandEvent& event);
|
||||
void OnScreenshot(wxCommandEvent& event);
|
||||
|
@ -129,6 +129,7 @@ void CFrame::CreateMenu()
|
||||
// Emulation menu
|
||||
wxMenu* emulationMenu = new wxMenu;
|
||||
emulationMenu->Append(IDM_PLAY, _T("&Play\tF10"));
|
||||
emulationMenu->Append(IDM_RECORD, _T("&Start Recording"));
|
||||
emulationMenu->Append(IDM_CHANGEDISC, _T("Change &Disc"));
|
||||
emulationMenu->Append(IDM_STOP, _T("&Stop"));
|
||||
|
||||
@ -486,6 +487,28 @@ void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED (event))
|
||||
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))
|
||||
{
|
||||
BootGame();
|
||||
@ -532,6 +555,10 @@ void CFrame::DoStop()
|
||||
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
||||
if(!AskYesNo("Are you sure you want to stop the current emulation?", "Confirm", wxYES_NO))
|
||||
return;
|
||||
|
||||
// TODO: Show the author/description dialog here
|
||||
if(Frame::IsRecordingInput())
|
||||
Frame::EndRecordingInput();
|
||||
|
||||
Core::Stop();
|
||||
UpdateGUI();
|
||||
@ -831,6 +858,7 @@ void CFrame::UpdateGUI()
|
||||
|
||||
// Emulation
|
||||
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
|
||||
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!running && !paused);
|
||||
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
|
||||
m_pSubMenuLoad->Enable(initialized);
|
||||
m_pSubMenuSave->Enable(initialized);
|
||||
|
@ -62,6 +62,7 @@ enum
|
||||
IDM_FRAMESKIP8,
|
||||
IDM_FRAMESKIP9,
|
||||
IDM_PLAY,
|
||||
IDM_RECORD,
|
||||
IDM_STOP,
|
||||
IDM_SCREENSHOT,
|
||||
IDM_BROWSE,
|
||||
|
Loading…
Reference in New Issue
Block a user