2012-11-15 00:39:56 +01:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "rpcs3.h"
|
|
|
|
|
#include "Ini.h"
|
|
|
|
|
#include "Emu/System.h"
|
|
|
|
|
#include <wx/msw/wrapwin.h>
|
2013-06-30 10:46:29 +02:00
|
|
|
#include "Gui/CompilerELF.h"
|
|
|
|
|
|
|
|
|
|
const wxEventType wxEVT_DBG_COMMAND = wxNewEventType();
|
2012-11-15 00:39:56 +01:00
|
|
|
|
|
|
|
|
IMPLEMENT_APP(Rpcs3App)
|
|
|
|
|
Rpcs3App* TheApp;
|
|
|
|
|
|
|
|
|
|
bool Rpcs3App::OnInit()
|
|
|
|
|
{
|
|
|
|
|
TheApp = this;
|
|
|
|
|
SetAppName(_PRGNAME_);
|
|
|
|
|
wxInitAllImageHandlers();
|
|
|
|
|
|
|
|
|
|
Ini.Load();
|
|
|
|
|
|
|
|
|
|
m_MainFrame = new MainFrame();
|
2013-06-30 10:46:29 +02:00
|
|
|
SetTopWindow(m_MainFrame);
|
2012-11-15 00:39:56 +01:00
|
|
|
Emu.Init();
|
2013-06-30 10:46:29 +02:00
|
|
|
|
2013-11-18 03:10:59 +01:00
|
|
|
// (new CompilerELF(m_MainFrame))->Show();
|
2013-06-30 10:46:29 +02:00
|
|
|
m_debugger_frame = new DebuggerPanel(m_MainFrame);
|
|
|
|
|
ConLogFrame = new LogFrame(m_MainFrame);
|
|
|
|
|
|
|
|
|
|
m_MainFrame->AddPane(ConLogFrame, "Log", wxAUI_DOCK_BOTTOM);
|
|
|
|
|
m_MainFrame->AddPane(m_debugger_frame, "Debugger", wxAUI_DOCK_RIGHT);
|
|
|
|
|
//ConLogFrame->Show();
|
2012-11-15 00:39:56 +01:00
|
|
|
m_MainFrame->Show();
|
|
|
|
|
|
2013-06-30 10:46:29 +02:00
|
|
|
m_MainFrame->DoSettings(true);
|
2014-01-19 17:05:27 +01:00
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Rpcs3App::Exit()
|
|
|
|
|
{
|
|
|
|
|
Emu.Stop();
|
|
|
|
|
Ini.Save();
|
|
|
|
|
|
|
|
|
|
if(ConLogFrame && !ConLogFrame->IsBeingDeleted()) ConLogFrame->Close();
|
|
|
|
|
|
|
|
|
|
wxApp::Exit();
|
|
|
|
|
}
|
|
|
|
|
|
2013-11-03 20:23:16 +01:00
|
|
|
void Rpcs3App::SendDbgCommand(DbgCommand id, CPUThread* thr)
|
2013-06-30 10:46:29 +02:00
|
|
|
{
|
|
|
|
|
wxCommandEvent event(wxEVT_DBG_COMMAND, id);
|
|
|
|
|
event.SetClientData(thr);
|
|
|
|
|
AddPendingEvent(event);
|
|
|
|
|
}
|
|
|
|
|
|
2012-11-15 00:39:56 +01:00
|
|
|
/*
|
|
|
|
|
CPUThread& GetCPU(const u8 core)
|
|
|
|
|
{
|
|
|
|
|
return Emu.GetCPU().Get(core);
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
GameInfo CurGameInfo;
|