GUI: Fixed boot settings
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4180 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c82c0b0b93
commit
486798c580
|
@ -303,10 +303,6 @@ void CCodeWindow::OnCodeViewChange(wxCommandEvent &event)
|
|||
|
||||
void CCodeWindow::OnAddrBoxChange(wxCommandEvent& event)
|
||||
{
|
||||
ConsoleListener* Console = LogManager::GetInstance()->getConsoleListener();
|
||||
Console->Log(LogTypes::LNOTICE, StringFromFormat(
|
||||
"GetToolBar():%i\n", GetToolBar()).c_str());
|
||||
|
||||
if (!GetToolBar()) return;
|
||||
|
||||
wxTextCtrl* pAddrCtrl = (wxTextCtrl*)GetToolBar()->FindControl(IDM_ADDRBOX);
|
||||
|
|
|
@ -230,6 +230,8 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
|||
|
||||
void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||
{
|
||||
Parent->ClearStatusBar();
|
||||
|
||||
if (Core::GetState() == Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
// TODO: disable menu items instead :P
|
||||
|
@ -265,8 +267,12 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||
SignatureDB db;
|
||||
if (db.Load((File::GetSysDirectory() + TOTALDB).c_str()))
|
||||
db.Apply(&g_symbolDB);
|
||||
} else {
|
||||
Parent->StatusBarMessage("'%s' not found, scanning for common functions instead", mapfile.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
g_symbolDB.LoadMap(mapfile.c_str());
|
||||
Parent->StatusBarMessage("Loaded symbols from '%s'", mapfile.c_str());
|
||||
}
|
||||
HLE::PatchFunctions();
|
||||
NotifyMapLoaded();
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
extern CFrame* main_frame;
|
||||
extern CCodeWindow* g_pCodeWindow;
|
||||
#endif
|
||||
|
||||
namespace BootManager
|
||||
|
@ -83,21 +82,21 @@ bool BootCore(const std::string& _rFilename)
|
|||
|
||||
// Use custom settings for debugging mode
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
if (g_pCodeWindow)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
//StartUp.bUseDualCore = code_frame->UseDualCore();
|
||||
StartUp.bUseJIT = !g_pCodeWindow->UseInterpreter();
|
||||
StartUp.bBootToPause = g_pCodeWindow->BootToPause();
|
||||
StartUp.bAutomaticStart = g_pCodeWindow->AutomaticStart();
|
||||
StartUp.bJITUnlimitedCache = g_pCodeWindow->UnlimitedJITCache();
|
||||
StartUp.bJITBlockLinking = g_pCodeWindow->JITBlockLinking();
|
||||
StartUp.bUseJIT = !main_frame->g_pCodeWindow->UseInterpreter();
|
||||
StartUp.bBootToPause = main_frame->g_pCodeWindow->BootToPause();
|
||||
StartUp.bAutomaticStart = main_frame->g_pCodeWindow->AutomaticStart();
|
||||
StartUp.bJITUnlimitedCache = main_frame->g_pCodeWindow->UnlimitedJITCache();
|
||||
StartUp.bJITBlockLinking = main_frame->g_pCodeWindow->JITBlockLinking();
|
||||
}
|
||||
else
|
||||
{
|
||||
//StartUp.bUseDualCore = false;
|
||||
//StartUp.bUseJIT = true;
|
||||
}
|
||||
StartUp.bEnableDebugging = g_pCodeWindow ? true : false; // RUNNING_DEBUG
|
||||
StartUp.bEnableDebugging = main_frame->g_pCodeWindow ? true : false; // RUNNING_DEBUG
|
||||
#endif
|
||||
|
||||
StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO;
|
||||
|
@ -193,8 +192,7 @@ bool BootCore(const std::string& _rFilename)
|
|||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
// Boot to pause or not
|
||||
Core::SetState((g_pCodeWindow && StartUp.bBootToPause)
|
||||
? Core::CORE_PAUSE : Core::CORE_RUN);
|
||||
Core::SetState((main_frame->g_pCodeWindow && StartUp.bBootToPause) ? Core::CORE_PAUSE : Core::CORE_RUN);
|
||||
#else
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
#endif
|
||||
|
|
|
@ -79,6 +79,8 @@ class CFrame : public wxFrame
|
|||
void PostEvent(wxCommandEvent& event);
|
||||
void PostMenuEvent(wxMenuEvent& event);
|
||||
void PostUpdateUIEvent(wxUpdateUIEvent& event);
|
||||
void StatusBarMessage(char * Text, ...);
|
||||
void ClearStatusBar();
|
||||
|
||||
// ---------------------------------------
|
||||
// Wiimote leds
|
||||
|
@ -216,7 +218,6 @@ class CFrame : public wxFrame
|
|||
void PopulateToolbarAui(wxAuiToolBar* toolBar);
|
||||
void RecreateToolbar();
|
||||
void CreateMenu();
|
||||
void ClearStatusBar();
|
||||
wxPanel *CreateEmptyPanel();
|
||||
wxAuiNotebook *CreateEmptyNotebook();
|
||||
|
||||
|
|
|
@ -714,7 +714,18 @@ void CFrame::ClearStatusBar()
|
|||
{
|
||||
if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(wxT(""),0);
|
||||
}
|
||||
void CFrame::StatusBarMessage(char * Text, ...)
|
||||
{
|
||||
const int MAX_BYTES = 1024*10;
|
||||
char Str[MAX_BYTES];
|
||||
va_list ArgPtr;
|
||||
int Cnt;
|
||||
va_start(ArgPtr, Text);
|
||||
Cnt = vsnprintf(Str, MAX_BYTES, Text, ArgPtr);
|
||||
va_end(ArgPtr);
|
||||
|
||||
if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(wxString::FromAscii(Str),0);
|
||||
}
|
||||
|
||||
|
||||
// Miscellaneous menus
|
||||
|
|
|
@ -50,7 +50,6 @@ IMPLEMENT_APP(DolphinApp)
|
|||
#endif
|
||||
|
||||
CFrame* main_frame = NULL;
|
||||
CCodeWindow* g_pCodeWindow = NULL;
|
||||
LogManager *logManager = NULL;
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -348,6 +347,26 @@ void DolphinApp::OnEndSession()
|
|||
}
|
||||
/////////////////////////////////////// Main window created
|
||||
|
||||
|
||||
// g_VideoInitialize.pSysMessage() goes here
|
||||
void Host_SysMessage(const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char msg[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(msg, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
|
||||
//wxMessageBox(wxString::FromAscii(msg));
|
||||
PanicAlert("%s", msg);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Talk to GUI
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
#if defined HAVE_WX && HAVE_WX
|
||||
bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*/)
|
||||
{
|
||||
|
@ -355,7 +374,6 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
|
|||
wxString::FromAscii(caption),
|
||||
(yes_no)?wxYES_NO:wxOK);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Accessor for the main window class
|
||||
CFrame* DolphinApp::GetCFrame()
|
||||
|
@ -370,9 +388,9 @@ void Host_NotifyMapLoaded()
|
|||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_NOTIFYMAPLOADED);
|
||||
wxPostEvent(main_frame, event);
|
||||
|
||||
if (g_pCodeWindow)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
wxPostEvent(g_pCodeWindow, event);
|
||||
wxPostEvent(main_frame->g_pCodeWindow, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -382,9 +400,9 @@ void Host_UpdateLogDisplay()
|
|||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATELOGDISPLAY);
|
||||
wxPostEvent(main_frame, event);
|
||||
|
||||
if (g_pCodeWindow)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
wxPostEvent(g_pCodeWindow, event);
|
||||
wxPostEvent(main_frame->g_pCodeWindow, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,9 +412,9 @@ void Host_UpdateDisasmDialog()
|
|||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEDISASMDIALOG);
|
||||
wxPostEvent(main_frame, event);
|
||||
|
||||
if (g_pCodeWindow)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
wxPostEvent(g_pCodeWindow, event);
|
||||
wxPostEvent(main_frame->g_pCodeWindow, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -411,9 +429,9 @@ void Host_UpdateMainFrame()
|
|||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEGUI);
|
||||
wxPostEvent(main_frame, event);
|
||||
|
||||
if (g_pCodeWindow)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
wxPostEvent(g_pCodeWindow, event);
|
||||
wxPostEvent(main_frame->g_pCodeWindow, event);
|
||||
}
|
||||
}
|
||||
// Remove this?
|
||||
|
@ -422,9 +440,9 @@ void Host_UpdateBreakPointView()
|
|||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS);
|
||||
wxPostEvent(main_frame, event);
|
||||
|
||||
if (g_pCodeWindow)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
wxPostEvent(g_pCodeWindow, event);
|
||||
wxPostEvent(main_frame->g_pCodeWindow, event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,21 +521,6 @@ void Host_UpdateStatusBar(const char* _pText, int Field)
|
|||
wxPostEvent(main_frame, event);
|
||||
}
|
||||
|
||||
// g_VideoInitialize.pSysMessage() goes here
|
||||
void Host_SysMessage(const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char msg[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(msg, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
|
||||
//wxMessageBox(wxString::FromAscii(msg));
|
||||
PanicAlert("%s", msg);
|
||||
}
|
||||
|
||||
void Host_SetWiiMoteConnectionState(int _State)
|
||||
{
|
||||
static int currentState = -1;
|
||||
|
@ -542,3 +545,5 @@ void Host_SetWiiMoteConnectionState(int _State)
|
|||
|
||||
wxPostEvent(main_frame, event);
|
||||
}
|
||||
#endif // HAVE_WX
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
Loading…
Reference in New Issue