Add ARM Jit to GUI when built on ARM

This commit is contained in:
Ryan Houdek 2013-03-06 03:25:45 +00:00
parent d6558e1c31
commit 1214bf1359
1 changed files with 22 additions and 7 deletions

View File

@ -53,6 +53,21 @@ using std::function;
#define TEXT_BOX(page, text) new wxStaticText(page, wxID_ANY, text, wxDefaultPosition, wxDefaultSize) #define TEXT_BOX(page, text) new wxStaticText(page, wxID_ANY, text, wxDefaultPosition, wxDefaultSize)
struct CPUCore
{
int CPUid;
const char *name;
};
const CPUCore CPUCores[] = {
{0, "Interpreter (VERY slow)"},
#ifdef _M_ARM
{3, "Arm JIT (experimental)"},
#else
{1, "JIT Recompiler (recommended)"},
{2, "JITIL experimental recompiler"},
#endif
};
extern CFrame* main_frame; extern CFrame* main_frame;
// keep these in sync with CConfigMain::InitializeGUILists // keep these in sync with CConfigMain::InitializeGUILists
@ -241,7 +256,6 @@ void CConfigMain::UpdateGUI()
PathsPage->Disable(); PathsPage->Disable();
} }
} }
void CConfigMain::InitializeGUILists() void CConfigMain::InitializeGUILists()
{ {
// General page // General page
@ -253,10 +267,9 @@ void CConfigMain::InitializeGUILists()
arrayStringFor_Framelimit.Add(wxString::Format(wxT("%i"), i)); arrayStringFor_Framelimit.Add(wxString::Format(wxT("%i"), i));
// Emulator Engine // Emulator Engine
arrayStringFor_CPUEngine.Add(_("Interpreter (VERY slow)")); for (unsigned int a = 0; a < (sizeof(CPUCores) / sizeof(CPUCore)); ++a)
arrayStringFor_CPUEngine.Add(_("JIT Recompiler (recommended)")); arrayStringFor_CPUEngine.Add(_(CPUCores[a].name));
arrayStringFor_CPUEngine.Add(_("JITIL experimental recompiler"));
// DSP Engine // DSP Engine
arrayStringFor_DSPEngine.Add(_("DSP HLE emulation (fast)")); arrayStringFor_DSPEngine.Add(_("DSP HLE emulation (fast)"));
arrayStringFor_DSPEngine.Add(_("DSP LLE recompiler")); arrayStringFor_DSPEngine.Add(_("DSP LLE recompiler"));
@ -329,7 +342,9 @@ void CConfigMain::InitializeGUIValues()
UseFPSForLimiting->SetValue(SConfig::GetInstance().b_UseFPS); UseFPSForLimiting->SetValue(SConfig::GetInstance().b_UseFPS);
// General - Advanced // General - Advanced
CPUEngine->SetSelection(startup_params.iCPUCore); for (unsigned int a = 0; a < (sizeof(CPUCores) / sizeof(CPUCore)); ++a)
if (CPUCores[a].CPUid == startup_params.iCPUCore)
CPUEngine->SetSelection(a);
_NTSCJ->SetValue(startup_params.bForceNTSCJ); _NTSCJ->SetValue(startup_params.bForceNTSCJ);
@ -888,7 +903,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
break; break;
// Core - Advanced // Core - Advanced
case ID_CPUENGINE: case ID_CPUENGINE:
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUEngine->GetSelection(); SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUCores[CPUEngine->GetSelection()].CPUid;
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER, main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER,
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore?false:true); SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore?false:true);