2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2011 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:43:35 +00:00
|
|
|
// Refer to the license.txt file included.
|
2011-03-27 02:55:08 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2011-03-27 02:55:08 +00:00
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <cstddef>
|
2012-01-05 16:49:46 +00:00
|
|
|
#include <vector>
|
2014-02-22 22:36:30 +00:00
|
|
|
#include <wx/dialog.h>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class wxButton;
|
|
|
|
class wxCheckBox;
|
|
|
|
class wxListBox;
|
|
|
|
class wxNotebook;
|
|
|
|
class wxPaintEvent;
|
|
|
|
class wxPanel;
|
2011-03-27 02:55:08 +00:00
|
|
|
class wxSpinCtrl;
|
|
|
|
class wxSpinEvent;
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxStaticText;
|
|
|
|
class wxTextCtrl;
|
2011-03-27 02:55:08 +00:00
|
|
|
|
|
|
|
class FifoPlayerDlg : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FifoPlayerDlg(wxWindow* parent);
|
|
|
|
~FifoPlayerDlg();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateGUIControls();
|
|
|
|
|
2015-02-15 19:43:31 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void OnFrameFrom(wxSpinEvent& event);
|
|
|
|
void OnFrameTo(wxSpinEvent& event);
|
|
|
|
void OnObjectFrom(wxSpinEvent& event);
|
|
|
|
void OnObjectTo(wxSpinEvent& event);
|
|
|
|
void OnCheckEarlyMemoryUpdates(wxCommandEvent& event);
|
|
|
|
void OnRecordStop(wxCommandEvent& event);
|
|
|
|
void OnSaveFile(wxCommandEvent& event);
|
|
|
|
void OnNumFramesToRecord(wxSpinEvent& event);
|
|
|
|
void OnCloseClick(wxCommandEvent& event);
|
2011-03-27 02:55:08 +00:00
|
|
|
|
2012-01-21 12:40:14 +00:00
|
|
|
void OnBeginSearch(wxCommandEvent& event);
|
|
|
|
void OnFindNextClick(wxCommandEvent& event);
|
|
|
|
void OnFindPreviousClick(wxCommandEvent& event);
|
|
|
|
void OnSearchFieldTextChanged(wxCommandEvent& event);
|
|
|
|
void ChangeSearchResult(unsigned int result_idx);
|
2013-05-06 20:18:46 +00:00
|
|
|
void ResetSearch();
|
2012-01-21 12:40:14 +00:00
|
|
|
|
2013-01-13 18:07:45 +00:00
|
|
|
void OnRecordingFinished(wxEvent& event);
|
|
|
|
void OnFrameWritten(wxEvent& event);
|
2011-03-27 02:55:08 +00:00
|
|
|
|
2012-01-03 01:30:37 +00:00
|
|
|
void OnFrameListSelectionChanged(wxCommandEvent& event);
|
|
|
|
void OnObjectListSelectionChanged(wxCommandEvent& event);
|
|
|
|
void OnObjectCmdListSelectionChanged(wxCommandEvent& event);
|
2012-10-22 10:25:41 +00:00
|
|
|
void OnObjectCmdListSelectionCopy(wxCommandEvent& WXUNUSED(event));
|
2012-01-03 01:30:37 +00:00
|
|
|
|
2011-03-27 02:55:08 +00:00
|
|
|
void UpdatePlayGui();
|
|
|
|
void UpdateRecorderGui();
|
2012-01-03 01:30:37 +00:00
|
|
|
void UpdateAnalyzerGui();
|
2011-03-27 02:55:08 +00:00
|
|
|
|
|
|
|
wxString CreateFileFrameCountLabel() const;
|
|
|
|
wxString CreateCurrentFrameLabel() const;
|
|
|
|
wxString CreateFileObjectCountLabel() const;
|
|
|
|
wxString CreateRecordingFifoSizeLabel() const;
|
|
|
|
wxString CreateRecordingMemSizeLabel() const;
|
|
|
|
wxString CreateRecordingFrameCountLabel() const;
|
|
|
|
|
|
|
|
bool GetSaveButtonEnabled() const;
|
|
|
|
|
|
|
|
// Called from a non-GUI thread
|
|
|
|
static void RecordingFinished();
|
|
|
|
static void FileLoaded();
|
|
|
|
static void FrameWritten();
|
|
|
|
|
|
|
|
static wxEvtHandler *volatile m_EvtHandler;
|
|
|
|
|
|
|
|
wxNotebook* m_Notebook;
|
|
|
|
wxPanel* m_PlayPage;
|
|
|
|
wxStaticText* m_NumFramesLabel;
|
|
|
|
wxStaticText* m_CurrentFrameLabel;
|
|
|
|
wxStaticText* m_NumObjectsLabel;
|
|
|
|
wxStaticText* m_FrameFromLabel;
|
|
|
|
wxSpinCtrl* m_FrameFromCtrl;
|
|
|
|
wxStaticText* m_FrameToLabel;
|
|
|
|
wxSpinCtrl* m_FrameToCtrl;
|
|
|
|
wxStaticText* m_ObjectFromLabel;
|
|
|
|
wxSpinCtrl* m_ObjectFromCtrl;
|
|
|
|
wxStaticText* m_ObjectToLabel;
|
|
|
|
wxSpinCtrl* m_ObjectToCtrl;
|
|
|
|
wxCheckBox* m_EarlyMemoryUpdates;
|
|
|
|
wxPanel* m_RecordPage;
|
|
|
|
wxStaticText* m_RecordingFifoSizeLabel;
|
|
|
|
wxStaticText* m_RecordingMemSizeLabel;
|
|
|
|
wxStaticText* m_RecordingFramesLabel;
|
|
|
|
wxButton* m_RecordStop;
|
|
|
|
wxButton* m_Save;
|
|
|
|
wxStaticText* m_FramesToRecordLabel;
|
|
|
|
wxSpinCtrl* m_FramesToRecordCtrl;
|
2012-01-03 01:30:37 +00:00
|
|
|
|
|
|
|
wxPanel* m_AnalyzePage;
|
|
|
|
wxListBox* m_framesList;
|
|
|
|
wxListBox* m_objectsList;
|
|
|
|
wxListBox* m_objectCmdList;
|
2012-01-05 16:49:46 +00:00
|
|
|
std::vector<u32> m_objectCmdOffsets;
|
|
|
|
wxStaticText* m_objectCmdInfo;
|
2012-01-03 01:30:37 +00:00
|
|
|
|
2012-01-21 12:40:14 +00:00
|
|
|
wxTextCtrl* m_searchField;
|
|
|
|
wxButton* m_beginSearch;
|
|
|
|
wxButton* m_findNext;
|
|
|
|
wxButton* m_findPrevious;
|
|
|
|
wxStaticText* m_numResultsText;
|
|
|
|
|
|
|
|
struct SearchResult {
|
|
|
|
int frame_idx;
|
|
|
|
int obj_idx;
|
|
|
|
int cmd_idx;
|
|
|
|
};
|
|
|
|
std::vector<SearchResult> search_results;
|
|
|
|
unsigned int m_search_result_idx;
|
|
|
|
|
2011-03-27 02:55:08 +00:00
|
|
|
wxButton* m_Close;
|
|
|
|
|
|
|
|
s32 m_FramesToRecord;
|
|
|
|
};
|