mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-08 07:55:35 +00:00
rsx: Add gui element to enable capture frame
This commit is contained in:
parent
70b9271cd8
commit
660bc34157
3 changed files with 137 additions and 0 deletions
|
|
@ -9,12 +9,14 @@
|
|||
#include "Emu/CPU/CPUThreadManager.h"
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
|
||||
extern bool user_asked_for_frame_capture;
|
||||
|
||||
class DbgEmuPanel : public wxPanel
|
||||
{
|
||||
wxButton* m_btn_run;
|
||||
wxButton* m_btn_stop;
|
||||
wxButton* m_btn_restart;
|
||||
wxButton* m_btn_capture_frame;
|
||||
|
||||
public:
|
||||
DbgEmuPanel(wxWindow* parent) : wxPanel(parent)
|
||||
|
|
@ -28,11 +30,15 @@ public:
|
|||
m_btn_restart = new wxButton(this, wxID_ANY, "Restart");
|
||||
m_btn_restart->Bind(wxEVT_BUTTON, &DbgEmuPanel::OnRestart, this);
|
||||
|
||||
m_btn_capture_frame = new wxButton(this, wxID_ANY, "Capture frame");
|
||||
m_btn_capture_frame->Bind(wxEVT_BUTTON, &DbgEmuPanel::OnCaptureFrame, this);
|
||||
|
||||
wxBoxSizer* s_b_main = new wxBoxSizer(wxHORIZONTAL);
|
||||
s_b_main->Add(m_btn_run, wxSizerFlags().Border(wxALL, 5));
|
||||
s_b_main->Add(m_btn_stop, wxSizerFlags().Border(wxALL, 5));
|
||||
s_b_main->Add(new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL), 0, wxEXPAND);
|
||||
s_b_main->Add(m_btn_restart, wxSizerFlags().Border(wxALL, 5));
|
||||
s_b_main->Add(m_btn_capture_frame, wxSizerFlags().Border(wxALL, 5));
|
||||
|
||||
SetSizerAndFit(s_b_main);
|
||||
Layout();
|
||||
|
|
@ -75,6 +81,11 @@ public:
|
|||
Emu.Load();
|
||||
}
|
||||
|
||||
void OnCaptureFrame(wxCommandEvent& event)
|
||||
{
|
||||
user_asked_for_frame_capture = true;
|
||||
}
|
||||
|
||||
void HandleCommand(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue