rpcsx/rpcs3/rpcs3.cpp
Alexandro Sánchez Bach 6c28753dae Minor fixes: SPU, sys_mmapper, and cmd-line args.
* Some SPU instructions updated:
- Updated wrong instructions: SHLH, FRDS
- Added UNIMPLEMENTED warning to: HBR, HBRA, HBRR
* Updated sys_mmapper_allocate_memory declaration in SysCalls.h
* Added sceNp.cpp to project
* Added checkbox in the Settings menu for exiting RPCS3 when
sys_process_exit (SC_Process.cpp) is called. Unfortunately, due to some
problems, this checkbox doesn't have a real effect yet.
2014-03-01 19:33:40 +01:00

75 lines
1.2 KiB
C++

#include "stdafx.h"
#include "rpcs3.h"
#include "Ini.h"
#include "Emu/System.h"
#ifdef _WIN32
#include <wx/msw/wrapwin.h>
#endif
const wxEventType wxEVT_DBG_COMMAND = wxNewEventType();
IMPLEMENT_APP(Rpcs3App)
Rpcs3App* TheApp;
bool Rpcs3App::OnInit()
{
TheApp = this;
SetAppName(_PRGNAME_);
wxInitAllImageHandlers();
Ini.Load();
m_MainFrame = new MainFrame();
SetTopWindow(m_MainFrame);
Emu.Init();
m_MainFrame->Show();
m_MainFrame->DoSettings(true);
OnArguments();
return true;
}
void Rpcs3App::OnArguments()
{
// Usage:
// rpcs3-*.exe Initializes RPCS3
// rpcs3-*.exe [(S)ELF] Initializes RPCS3, then loads and runs the specified (S)ELF file.
if (Rpcs3App::argc > 1)
{
// Force this value to be true
Ini.HLEExitOnStop.SetValue(true);
Emu.SetPath(argv[1]);
Emu.Load();
Emu.Run();
}
}
void Rpcs3App::Exit()
{
Emu.Stop();
Ini.Save();
if(ConLogFrame && !ConLogFrame->IsBeingDeleted()) ConLogFrame->Close();
wxApp::Exit();
}
void Rpcs3App::SendDbgCommand(DbgCommand id, CPUThread* thr)
{
wxCommandEvent event(wxEVT_DBG_COMMAND, id);
event.SetClientData(thr);
AddPendingEvent(event);
}
/*
CPUThread& GetCPU(const u8 core)
{
return Emu.GetCPU().Get(core);
}*/
GameInfo CurGameInfo;