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 ) if( g_pUpdateFPSDisplay != NULL )
g_pUpdateFPSDisplay(temp); g_pUpdateFPSDisplay(temp);
Host_UpdateStatusBar(temp);
frames = 0; frames = 0;
Timer.Update(); Timer.Update();
} }

View File

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

View File

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

View File

@ -48,12 +48,12 @@ bool BootCore(const std::string& _rFilename)
if (code_frame) if (code_frame)
{ {
StartUp.bUseDualCore = code_frame->UseDualCore(); // StartUp.bUseDualCore = code_frame->UseDualCore();
StartUp.bUseDynarec = !code_frame->UseInterpreter(); StartUp.bUseDynarec = !code_frame->UseInterpreter();
} }
else else
{ {
StartUp.bUseDualCore = false; // StartUp.bUseDualCore = false;
StartUp.bUseDynarec = true; 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_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD)
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse) EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen) EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen)
EVT_MENU(IDM_TOGGLE_DUALCORE, CFrame::OnToggleDualCore)
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage) EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
END_EVENT_TABLE() END_EVENT_TABLE()
@ -106,6 +107,7 @@ CFrame::CFrame(wxFrame* parent,
, m_pMenuBar(NULL) , m_pMenuBar(NULL)
, m_Panel(NULL) , m_Panel(NULL)
, m_pBootProcessDialog(NULL) , m_pBootProcessDialog(NULL)
, m_pStatusBar(NULL)
{ {
InitBitmaps(); InitBitmaps();
@ -115,7 +117,7 @@ CFrame::CFrame(wxFrame* parent,
SetIcon(IconTemp); SetIcon(IconTemp);
// Give it a status line // Give it a status line
CreateStatusBar(); m_pStatusBar = CreateStatusBar();
CreateMenu(); CreateMenu();
// this panel is the parent for rendering and it holds the gamelistctrl // this panel is the parent for rendering and it holds the gamelistctrl
@ -203,12 +205,18 @@ CFrame::CreateMenu()
pEmulationMenu->Append(m_pMenuItemStop); pEmulationMenu->Append(m_pMenuItemStop);
} }
pEmulationMenu->AppendSeparator(); pEmulationMenu->AppendSeparator();
// full screen
{ {
// full screen
wxMenuItem* pItem = new wxMenuItem(pEmulationMenu, IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen")); wxMenuItem* pItem = new wxMenuItem(pEmulationMenu, IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen"));
pItem->SetBitmap(m_BitmapsMenu[Toolbar_FullScreen]); pItem->SetBitmap(m_BitmapsMenu[Toolbar_FullScreen]);
pEmulationMenu->Append(pItem); 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")); m_pMenuBar->Append(pEmulationMenu, _T("&Emulation"));
} }
@ -510,7 +518,6 @@ CFrame::OnHostMessage(wxCommandEvent& event)
m_pBootProcessDialog = new wxBusyInfo("Booting...", this); m_pBootProcessDialog = new wxBusyInfo("Booting...", this);
} }
break; break;
case IDM_BOOTING_ENDED: case IDM_BOOTING_ENDED:
@ -521,7 +528,14 @@ CFrame::OnHostMessage(wxCommandEvent& event)
delete m_pBootProcessDialog; delete m_pBootProcessDialog;
m_pBootProcessDialog = NULL; m_pBootProcessDialog = NULL;
} }
break;
case IDM_UPDATESTATUSBAR:
if (m_pStatusBar != NULL)
{
m_pStatusBar->SetStatusText(event.GetString());
}
break; 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 void
CFrame::OnKeyDown(wxKeyEvent& event) CFrame::OnKeyDown(wxKeyEvent& event)
{ {

View File

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

View File

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

View File

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