rpcsx/rpcs3/Emu/GS/Null/NullGSRender.h
DH 4b8d6b6919 Improved ThreadBase.
Improved Vertex Shader Decompiler.
2014-01-31 20:40:18 +02:00

85 lines
1 KiB
C++

#pragma once
#include "Emu/GS/GSRender.h"
struct NullGSFrame : public GSFrame
{
NullGSFrame() : GSFrame(NULL, "GSFrame[Null]")
{
Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(GSFrame::OnLeftDclick));
}
void Draw()
{
wxClientDC dc(this);
Draw(&dc);
}
private:
virtual void OnPaint(wxPaintEvent& event)
{
wxPaintDC dc(this);
Draw(&dc);
}
virtual void OnSize(wxSizeEvent& event)
{
GSFrame::OnSize(event);
Draw();
}
void Draw(wxDC* dc)
{
dc->DrawText("Null GS output", 0, 0);
}
};
class NullGSRender
: public wxWindow
, public GSRender
{
public:
NullGSFrame* m_frame;
NullGSRender() : m_frame(nullptr)
{
m_frame = new NullGSFrame();
}
virtual ~NullGSRender()
{
m_frame->Close();
}
private:
virtual void OnInit()
{
m_frame->Show();
}
virtual void OnInitThread()
{
}
virtual void OnExitThread()
{
}
virtual void OnReset()
{
}
virtual void ExecCMD()
{
}
virtual void Flip()
{
}
virtual void Close()
{
Stop();
if(m_frame->IsShown()) m_frame->Hide();
}
};