added additional information like FPS to the status bar

added menu option to activate dual core support

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@11 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fires.gc 2008-07-16 12:19:14 +00:00
parent 222d669d8b
commit cb5072c3e4
8 changed files with 45 additions and 9 deletions

View File

@ -444,6 +444,9 @@ void Callback_VideoCopiedToXFB()
if( g_pUpdateFPSDisplay != NULL )
g_pUpdateFPSDisplay(temp);
Host_UpdateStatusBar(temp);
frames = 0;
Timer.Update();
}

View File

@ -49,5 +49,6 @@ void Host_SetWaitCursor(bool enable);
void Host_CreateDisplay();
void Host_CloseDisplay();
void Host_UpdateStatusBar(const char* _pText);
#endif

View File

@ -144,8 +144,8 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
wxMenuItem* interpreter = pDebugMenu->Append(IDM_INTERPRETER, _T("&Interpreter"), wxEmptyString, wxITEM_CHECK);
interpreter->Check(!_LocalCoreStartupParameter.bUseDynarec);
wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
// wxMenuItem* dualcore = pDebugMenu->Append(IDM_DUALCORE, _T("&DualCore"), wxEmptyString, wxITEM_CHECK);
// dualcore->Check(_LocalCoreStartupParameter.bUseDualCore);
pMenuBar->Append(pDebugMenu, _T("&Core Startup"));
}

View File

@ -48,12 +48,12 @@ bool BootCore(const std::string& _rFilename)
if (code_frame)
{
StartUp.bUseDualCore = code_frame->UseDualCore();
// StartUp.bUseDualCore = code_frame->UseDualCore();
StartUp.bUseDynarec = !code_frame->UseInterpreter();
}
else
{
StartUp.bUseDualCore = false;
// StartUp.bUseDualCore = false;
StartUp.bUseDynarec = true;
}

View File

@ -89,6 +89,7 @@ EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnPluginDSP)
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD)
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen)
EVT_MENU(IDM_TOGGLE_DUALCORE, CFrame::OnToggleDualCore)
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
END_EVENT_TABLE()
@ -106,6 +107,7 @@ CFrame::CFrame(wxFrame* parent,
, m_pMenuBar(NULL)
, m_Panel(NULL)
, m_pBootProcessDialog(NULL)
, m_pStatusBar(NULL)
{
InitBitmaps();
@ -115,7 +117,7 @@ CFrame::CFrame(wxFrame* parent,
SetIcon(IconTemp);
// Give it a status line
CreateStatusBar();
m_pStatusBar = CreateStatusBar();
CreateMenu();
// this panel is the parent for rendering and it holds the gamelistctrl
@ -202,13 +204,19 @@ CFrame::CreateMenu()
m_pMenuItemStop->SetDisabledBitmap(m_BitmapsMenu[Toolbar_Stop_Dis]);
pEmulationMenu->Append(m_pMenuItemStop);
}
pEmulationMenu->AppendSeparator();
// full screen
pEmulationMenu->AppendSeparator();
{
// full screen
wxMenuItem* pItem = new wxMenuItem(pEmulationMenu, IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen"));
pItem->SetBitmap(m_BitmapsMenu[Toolbar_FullScreen]);
pEmulationMenu->Append(pItem);
}
{
// dual core
wxMenuItem* pItem = new wxMenuItem(pEmulationMenu, IDM_TOGGLE_DUALCORE, _T("&Dual Core (instable!)"), wxEmptyString, wxITEM_CHECK);
pEmulationMenu->Append(pItem);
pItem->Check(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
}
m_pMenuBar->Append(pEmulationMenu, _T("&Emulation"));
}
@ -510,7 +518,6 @@ CFrame::OnHostMessage(wxCommandEvent& event)
m_pBootProcessDialog = new wxBusyInfo("Booting...", this);
}
break;
case IDM_BOOTING_ENDED:
@ -521,8 +528,15 @@ CFrame::OnHostMessage(wxCommandEvent& event)
delete m_pBootProcessDialog;
m_pBootProcessDialog = NULL;
}
break;
case IDM_UPDATESTATUSBAR:
if (m_pStatusBar != NULL)
{
m_pStatusBar->SetStatusText(event.GetString());
}
break;
}
}
@ -535,6 +549,14 @@ CFrame::OnToggleFullscreen(wxCommandEvent& WXUNUSED (event))
}
void
CFrame::OnToggleDualCore(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore = !SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore;
SConfig::GetInstance().SaveSettings();
}
void
CFrame::OnKeyDown(wxKeyEvent& event)
{

View File

@ -65,10 +65,12 @@ class CFrame
void OnStop(wxCommandEvent& event);
void OnBrowse(wxCommandEvent& event);
void OnToggleFullscreen(wxCommandEvent& event);
void OnToggleDualCore(wxCommandEvent& event);
void OnKeyDown(wxKeyEvent& event);
void OnHostMessage(wxCommandEvent& event);
wxStatusBar* m_pStatusBar;
wxMenuBar* m_pMenuBar;
wxMenuItem* m_pMenuItemPlay;

View File

@ -30,10 +30,12 @@ enum
IDM_CONFIG_DSP_PLUGIN,
IDM_CONFIG_PAD_PLUGIN,
IDM_TOGGLE_FULLSCREEN,
IDM_TOGGLE_DUALCORE,
IDM_NOTIFYMAPLOADED,
IDM_UPDATELOGDISPLAY,
IDM_UPDATEDISASMDIALOG,
IDM_UPDATEGUI,
IDM_UPDATESTATUSBAR,
IDM_HOST_MESSAGE,
IDM_BOOTING_STARTED,
IDM_BOOTING_ENDED,

View File

@ -221,4 +221,10 @@ void Host_CreateDisplay()
void Host_CloseDisplay()
{}
void Host_UpdateStatusBar(const char* _pText)
{
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR);
event.SetString(_pText);
wxPostEvent(main_frame, event);
}