GUI: Fixed some GUI related start/stop crashes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4223 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-09-07 12:40:43 +00:00
parent 49601e0af2
commit 7e115dcb00
27 changed files with 424 additions and 190 deletions

View File

@ -159,7 +159,7 @@ int abc = 0;
// Stop
case OPENGL_WM_USER_STOP:
main_frame->DoStop();
return 0; // Don't bother letting wxWidgets process this at all
return 0;
case OPENGL_WM_USER_CREATE:
// We don't have a local setting for bRenderToMain but we can detect it this way instead
@ -349,10 +349,10 @@ CFrame::CFrame(wxFrame* parent,
// Debugger class
if (UseDebugger)
{
g_pCodeWindow = new CCodeWindow(SConfig::GetInstance().m_LocalCoreStartupParameter, this, this, IDM_CODEWINDOW);
g_pCodeWindow = new CCodeWindow(SConfig::GetInstance().m_LocalCoreStartupParameter, this, IDM_CODEWINDOW);
g_pCodeWindow->Hide();
g_pCodeWindow->Load();
}
}
// Create timer
#if wxUSE_TIMER
@ -396,7 +396,7 @@ CFrame::CFrame(wxFrame* parent,
TOOLBAR_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_TEXT | wxAUI_TB_OVERFLOW /*overflow visible*/;
wxBitmap aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
if (UseDebugger)
if (g_pCodeWindow)
{
m_Mgr->AddPane(m_Panel, wxAuiPaneInfo().Name(wxT("Pane 0")).Caption(wxT("Pane 0")).Show());
}
@ -407,7 +407,7 @@ CFrame::CFrame(wxFrame* parent,
}
// Setup perspectives
if (UseDebugger)
if (g_pCodeWindow)
{
m_Mgr->GetPane(wxT("Pane 0")).CenterPane().PaneBorder(false);
AuiFullscreen = m_Mgr->SavePerspective();
@ -427,7 +427,7 @@ CFrame::CFrame(wxFrame* parent,
CPluginManager::GetInstance().ScanForPlugins();
// Setup perspectives
if (UseDebugger)
if (g_pCodeWindow)
{
// Load perspective
SaveLocal();
@ -441,7 +441,7 @@ CFrame::CFrame(wxFrame* parent,
// Show window
Show();
if (!UseDebugger)
if (!g_pCodeWindow)
{
SetSimplePaneSize();
if (SConfig::GetInstance().m_InterfaceLogWindow) DoToggleWindow(IDM_LOGWINDOW, true);
@ -461,6 +461,10 @@ CFrame::CFrame(wxFrame* parent,
// -------------------------
// Connect event handlers
wxTheApp->Connect(wxID_ANY, wxEVT_SIZE, // Keyboard
wxSizeEventHandler(CFrame::OnResizeAll),
(wxObject*)0, this);
wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, // Keyboard
wxKeyEventHandler(CFrame::OnKeyDown),
(wxObject*)0, this);
@ -524,7 +528,7 @@ void CFrame::OnRestart(wxCommandEvent& WXUNUSED (event))
char Str[MAX_PATH + 1];
DWORD Size = sizeof(Str)/sizeof(char);
DWORD n = GetModuleFileNameA(NULL, Str, Size);
ShellExecuteA(NULL, "open", PathToFilename(*new std::string(Str)).c_str(), UseDebugger ? "" : "-d", NULL, SW_SHOW);
ShellExecuteA(NULL, "open", PathToFilename(*new std::string(Str)).c_str(), g_pCodeWindow ? "" : "-d", NULL, SW_SHOW);
#endif
Close(true);
@ -538,8 +542,8 @@ void CFrame::OnClose(wxCloseEvent& event)
// Don't forget the skip or the window won't be destroyed
event.Skip();
// Save GUI settings
if (UseDebugger) g_pCodeWindow->Save();
if (UseDebugger) Save();
if (g_pCodeWindow) g_pCodeWindow->Save();
if (g_pCodeWindow) Save();
// Uninit
m_Mgr->UnInit();
@ -575,6 +579,18 @@ void CFrame::PostUpdateUIEvent(wxUpdateUIEvent& event)
if (g_pCodeWindow) wxPostEvent(g_pCodeWindow, event);
}
void CFrame::OnResize(wxSizeEvent& event)
{
event.Skip();
DoMoveIcons(); // In FrameWiimote.cpp
}
void CFrame::OnResizeAll(wxSizeEvent& event)
{
event.Skip();
//wxWindow * Win = (wxWindow*)event.GetEventObject();
//NOTICE_LOG(CONSOLE, "OnResizeAll: %i", (HWND)Win->GetHWND());
}
// Host messages
@ -590,10 +606,8 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
case SC_MONITORPOWER:
return 0;
}
default:
// Let wxWidgets process it as normal
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
}
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
}
#endif
@ -614,6 +628,37 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
}
}
void CFrame::OnCustomHostMessage(int Id)
{
wxWindow *Win;
switch(Id)
{
// Destroy windows
case AUDIO_DESTROY:
Win = GetWxWindow(wxT("Sound"));
if (Win)
{
DoRemovePage(Win, false);
CPluginManager::GetInstance().OpenDebug(
GetHandle(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin.c_str(),
PLUGIN_TYPE_DSP, false
);
//Win->Reparent(NULL);
//g_pCodeWindow->OnToggleSoundWindow(false, 0);
GetMenuBar()->FindItem(IDM_SOUNDWINDOW)->Check(false);
NOTICE_LOG(CONSOLE, "%s", Core::StopMessage(true, "Sound debugging window closed").c_str());
}
break;
case VIDEO_DESTROY:
break;
}
}
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
{
// Show all platforms and regions if...
@ -790,9 +835,7 @@ void CFrame::Update()
wxFrame * CFrame::CreateParentFrame(wxWindowID Id, const wxString& Title, wxWindow * Child)
{
//NOTICE_LOG(CONSOLE, "CreateParentFrame: %i %s %i", Id, Title.mb_str(), Child->GetId())
wxFrame * Frame = new wxFrame(this, Id, Title);
wxFrame * Frame = new wxFrame(this, Id, Title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE);
Child->Reparent(Frame);
Child->Show();
@ -921,4 +964,26 @@ void CFrame::ListChildren()
}
Console->Log(LogTypes::LNOTICE, "--------------------------------------------------------------------\n");
}
void CFrame::ListTopWindows()
{
wxWindowList::const_iterator i;
int j = 0;
const wxWindowList::const_iterator end = wxTopLevelWindows.end();
for (i = wxTopLevelWindows.begin(); i != end; ++i)
{
wxTopLevelWindow * const Win = wx_static_cast(wxTopLevelWindow *, *i);
NOTICE_LOG(CONSOLE, "%i: %i %s", j, Win, Win->GetTitle().mb_str());
/*
if ( win->ShouldPreventAppExit() )
{
// there remains at least one important TLW, don't exit
return false;
}
*/
j++;
}
NOTICE_LOG(CONSOLE, "\n");
}

View File

@ -81,6 +81,7 @@ class CFrame : public wxFrame
void PostUpdateUIEvent(wxUpdateUIEvent& event);
void StatusBarMessage(char * Text, ...);
void ClearStatusBar();
void OnCustomHostMessage(int Id);
// ---------------------------------------
// Wiimote leds
@ -122,6 +123,8 @@ class CFrame : public wxFrame
int Limit(int,int,int);
int PercentageToPixels(int,int);
int PixelsToPercentage(int,int);
void ListChildren();
void ListTopWindows();
// Perspectives
void AddRemoveBlankPage();
@ -131,7 +134,6 @@ class CFrame : public wxFrame
void OnFloatWindow(wxCommandEvent& event);
void OnTab(wxAuiNotebookEvent& event);
int GetNootebookAffiliation(wxString Name);
void ListChildren();
void ClosePages();
void DoToggleWindow(int,bool);
void ShowAllNotebooks(bool Window = false);
@ -285,6 +287,7 @@ class CFrame : public wxFrame
void OnToggleThrottle(wxCommandEvent& event);
void OnManagerResize(wxAuiManagerEvent& event);
void OnResize(wxSizeEvent& event);
void OnResizeAll(wxSizeEvent& event);
void OnToggleToolbar(wxCommandEvent& event);
void DoToggleToolbar(bool);
void OnToggleStatusbar(wxCommandEvent& event);

View File

@ -64,13 +64,6 @@ void CFrame::OnManagerResize(wxAuiManagerEvent& event)
event.Skip();
ResizeConsole();
}
void CFrame::OnResize(wxSizeEvent& event)
{
event.Skip();
// fit frame content, not needed right now
//FitInside();
DoMoveIcons(); // In FrameWiimote.cpp
}
void CFrame::OnPaneClose(wxAuiManagerEvent& event)
{
@ -127,7 +120,7 @@ void CFrame::ToggleLogWindow(bool bShow, int i)
}
// Hide pane
if (!UseDebugger) HidePane();
if (!g_pCodeWindow) HidePane();
// Make sure the check is updated (if wxw isn't calling this func)
//GetMenuBar()->FindItem(IDM_LOGWINDOW)->Check(Show);
@ -181,7 +174,7 @@ void CFrame::ToggleConsole(bool bShow, int i)
}
// Hide pane
if (!UseDebugger) HidePane();
if (!g_pCodeWindow) HidePane();
// Make sure the check is updated (if wxw isn't calling this func)
//GetMenuBar()->FindItem(IDM_CONSOLEWINDOW)->Check(Show);
@ -209,11 +202,11 @@ void CFrame::DoToggleWindow(int Id, bool bShow)
{
switch (Id)
{
case IDM_LOGWINDOW: ToggleLogWindow(bShow, UseDebugger ? g_pCodeWindow->iLogWindow : 0); break;
case IDM_CONSOLEWINDOW: ToggleConsole(bShow, UseDebugger ? g_pCodeWindow->iConsoleWindow : 0); break;
case IDM_LOGWINDOW: ToggleLogWindow(bShow, g_pCodeWindow ? g_pCodeWindow->iLogWindow : 0); break;
case IDM_CONSOLEWINDOW: ToggleConsole(bShow, g_pCodeWindow ? g_pCodeWindow->iConsoleWindow : 0); break;
}
if (!UseDebugger) return;
if (!g_pCodeWindow) return;
switch (Id)
{
@ -229,7 +222,7 @@ void CFrame::DoToggleWindow(int Id, bool bShow)
void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
{
event.Skip();
if (!UseDebugger) return;
if (!g_pCodeWindow) return;
// Remove the blank page if any
AddRemoveBlankPage();
@ -270,11 +263,11 @@ void CFrame::OnFloatWindow(wxCommandEvent& event)
}
switch(event.GetId())
{
case IDM_FLOAT_LOGWINDOW: if (FindWindowById(IDM_LOGWINDOW)) DoUnfloatPage(IDM_LOGWINDOW); break;
case IDM_FLOAT_CONSOLEWINDOW: if (FindWindowById(IDM_CONSOLEWINDOW)) DoUnfloatPage(IDM_CONSOLEWINDOW); break;
case IDM_FLOAT_LOGWINDOW: if (FindWindowById(IDM_LOGWINDOW)) DoUnfloatPage(IDM_LOGWINDOW_PARENT); break;
case IDM_FLOAT_CONSOLEWINDOW: if (FindWindowById(IDM_CONSOLEWINDOW)) DoUnfloatPage(IDM_CONSOLEWINDOW_PARENT); break;
}
if (!UseDebugger) return;
if (!g_pCodeWindow) return;
switch(event.GetId())
{
@ -286,17 +279,17 @@ void CFrame::OnFloatWindow(wxCommandEvent& event)
}
switch(event.GetId())
{
case IDM_FLOAT_CODEWINDOW: if (FindWindowById(IDM_CODEWINDOW)) DoUnfloatPage(IDM_LOGWINDOW); break;
case IDM_FLOAT_REGISTERWINDOW: if (FindWindowById(IDM_REGISTERWINDOW)) DoUnfloatPage(IDM_REGISTERWINDOW); break;
case IDM_FLOAT_BREAKPOINTWINDOW: if (FindWindowById(IDM_BREAKPOINTWINDOW)) DoUnfloatPage(IDM_BREAKPOINTWINDOW); break;
case IDM_FLOAT_MEMORYWINDOW: if (FindWindowById(IDM_MEMORYWINDOW)) DoUnfloatPage(IDM_MEMORYWINDOW); break;
case IDM_FLOAT_JITWINDOW: if (FindWindowById(IDM_JITWINDOW)) DoUnfloatPage(IDM_JITWINDOW); break;
case IDM_FLOAT_CODEWINDOW: if (FindWindowById(IDM_CODEWINDOW)) DoUnfloatPage(IDM_LOGWINDOW_PARENT); break;
case IDM_FLOAT_REGISTERWINDOW: if (FindWindowById(IDM_REGISTERWINDOW)) DoUnfloatPage(IDM_REGISTERWINDOW_PARENT); break;
case IDM_FLOAT_BREAKPOINTWINDOW: if (FindWindowById(IDM_BREAKPOINTWINDOW)) DoUnfloatPage(IDM_BREAKPOINTWINDOW_PARENT); break;
case IDM_FLOAT_MEMORYWINDOW: if (FindWindowById(IDM_MEMORYWINDOW)) DoUnfloatPage(IDM_MEMORYWINDOW_PARENT); break;
case IDM_FLOAT_JITWINDOW: if (FindWindowById(IDM_JITWINDOW)) DoUnfloatPage(IDM_JITWINDOW_PARENT); break;
}
}
void CFrame::OnTab(wxAuiNotebookEvent& event)
{
event.Skip();
if (!UseDebugger) return;
if (!g_pCodeWindow) return;
// Create the popup menu
wxMenu MenuPopup;
@ -416,11 +409,12 @@ void CFrame::DoRemovePage(wxWindow * Win, bool _Hide)
//wxASSERT(Win != NULL);
if (!Win) return;
if (FindWindowById(WindowParentIdFromChildId(Win->GetId())))
if (Win->GetId() > 0 && FindWindowById(WindowParentIdFromChildId(Win->GetId())))
{
Win->Reparent(this);
Win->Hide();
FindWindowById(WindowParentIdFromChildId(Win->GetId()))->Destroy();
WARN_LOG(CONSOLE, "Floating window %i closed", Win->GetId());
}
else
{
@ -916,10 +910,10 @@ void CFrame::ReloadPanes()
// Restore settings
SConfig::GetInstance().m_InterfaceConsole = bConsole;
// Load GUI settings
g_pCodeWindow->Load();
if (g_pCodeWindow) g_pCodeWindow->Load();
// Open notebook pages
AddRemoveBlankPage();
g_pCodeWindow->OpenPages();
if (g_pCodeWindow) g_pCodeWindow->OpenPages();
if (SConfig::GetInstance().m_InterfaceLogWindow) DoToggleWindow(IDM_LOGWINDOW, true);
if (SConfig::GetInstance().m_InterfaceConsole) DoToggleWindow(IDM_CONSOLEWINDOW, true);
@ -1274,13 +1268,13 @@ wxAuiNotebook * CFrame::GetNotebookFromId(u32 NBId)
}
return NULL;
}
void CFrame::ShowAllNotebooks(bool Window)
void CFrame::ShowAllNotebooks(bool bShow)
{
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
{
if (m_Mgr->GetAllPanes().Item(i).window->IsKindOf(CLASSINFO(wxAuiNotebook)))
{
if (Window)
if (bShow)
m_Mgr->GetAllPanes().Item(i).Show();
else
m_Mgr->GetAllPanes().Item(i).window->Hide();

View File

@ -119,7 +119,7 @@ void CFrame::CreateMenu()
fileMenu->AppendSeparator();
fileMenu->Append(IDM_BROWSE, _T("&Browse for ISOs..."));
fileMenu->AppendSeparator();
fileMenu->Append(IDM_RESTART, UseDebugger ? _T("Restart in regular mode") : _T("Restart in debugging mode"));
fileMenu->Append(IDM_RESTART, g_pCodeWindow ? _T("Restart in regular mode") : _T("Restart in debugging mode"));
fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt+F4"));
m_MenuBar->Append(fileMenu, _T("&File"));
@ -174,7 +174,7 @@ void CFrame::CreateMenu()
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _T("&Wiimote Settings"));
pOptionsMenu->AppendSeparator();
pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen\tAlt+Enter"));
if (UseDebugger)
if (g_pCodeWindow)
{
pOptionsMenu->AppendSeparator();
g_pCodeWindow->CreateMenuOptions(NULL, pOptionsMenu);
@ -210,7 +210,7 @@ void CFrame::CreateMenu()
viewMenu->Check(IDM_CONSOLEWINDOW, SConfig::GetInstance().m_InterfaceConsole);
viewMenu->AppendSeparator();
if (UseDebugger)
if (g_pCodeWindow)
{
g_pCodeWindow->CreateMenuView(NULL, viewMenu);
viewMenu->AppendSeparator();
@ -234,7 +234,7 @@ void CFrame::CreateMenu()
viewMenu->Append(IDM_PURGECACHE, _T("Purge Cache"));
m_MenuBar->Append(viewMenu, _T("&View"));
if (UseDebugger) g_pCodeWindow->CreateMenu(SConfig::GetInstance().m_LocalCoreStartupParameter, m_MenuBar);
if (g_pCodeWindow) g_pCodeWindow->CreateMenu(SConfig::GetInstance().m_LocalCoreStartupParameter, m_MenuBar);
// Help menu
wxMenu* helpMenu = new wxMenu;
@ -276,7 +276,7 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
ToolBar->AddTool(IDM_CONFIG_DSP_PLUGIN, _T("DSP"), m_Bitmaps[Toolbar_PluginDSP], _T("DSP settings"));
ToolBar->AddTool(IDM_CONFIG_PAD_PLUGIN, _T("Pad"), m_Bitmaps[Toolbar_PluginPAD], _T("Pad settings"));
ToolBar->AddTool(IDM_CONFIG_WIIMOTE_PLUGIN, _T("Wiimote"), m_Bitmaps[Toolbar_Wiimote], _T("Wiimote settings"));
if (!UseDebugger)
if (!g_pCodeWindow)
{
ToolBar->AddSeparator();
ToolBar->AddTool(IDM_HELPABOUT, _T("About"), m_Bitmaps[Toolbar_Help], _T("About Dolphin"));
@ -313,7 +313,7 @@ void CFrame::RecreateToolbar()
ToolbarPane().Top().
LeftDockable(false).RightDockable(false).Floatable(false));
if (UseDebugger)
if (g_pCodeWindow)
{
m_ToolBarDebug = new wxAuiToolBar(this, ID_TOOLBAR_DEBUG, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
g_pCodeWindow->PopulateToolbar(m_ToolBarDebug);
@ -859,45 +859,45 @@ void CFrame::OnFrameSkip(wxCommandEvent& event)
void CFrame::UpdateGUI()
{
// Save status
bool initialized = Core::isRunning();
bool running = Core::GetState() == Core::CORE_RUN;
bool paused = Core::GetState() == Core::CORE_PAUSE;
bool Initialized = Core::isRunning();
bool Running = Core::GetState() == Core::CORE_RUN;
bool Paused = Core::GetState() == Core::CORE_PAUSE;
// Make sure that we have a toolbar
if (m_ToolBar != NULL)
{
// Enable/disable the Config and Stop buttons
//GetToolBar()->EnableTool(IDM_CONFIG_MAIN, !initialized);
m_ToolBar->EnableTool(wxID_OPEN, !initialized);
m_ToolBar->EnableTool(wxID_REFRESH, !initialized); // Don't allow refresh when we don't show the list
m_ToolBar->EnableTool(IDM_STOP, running || paused);
m_ToolBar->EnableTool(IDM_SCREENSHOT, running || paused);
m_ToolBar->EnableTool(wxID_OPEN, !Initialized);
m_ToolBar->EnableTool(wxID_REFRESH, !Initialized); // Don't allow refresh when we don't show the list
m_ToolBar->EnableTool(IDM_STOP, Running || Paused);
m_ToolBar->EnableTool(IDM_SCREENSHOT, Running || Paused);
}
// File
GetMenuBar()->FindItem(wxID_OPEN)->Enable(!initialized);
m_pSubMenuDrive->Enable(!initialized);
GetMenuBar()->FindItem(wxID_REFRESH)->Enable(!initialized);
GetMenuBar()->FindItem(IDM_BROWSE)->Enable(!initialized);
GetMenuBar()->FindItem(wxID_OPEN)->Enable(!Initialized);
m_pSubMenuDrive->Enable(!Initialized);
GetMenuBar()->FindItem(wxID_REFRESH)->Enable(!Initialized);
GetMenuBar()->FindItem(IDM_BROWSE)->Enable(!Initialized);
// Emulation
GetMenuBar()->FindItem(IDM_STOP)->Enable(running || paused);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!initialized);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(!initialized);
GetMenuBar()->FindItem(IDM_FRAMESTEP)->Enable(running || paused);
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(running || paused);
m_pSubMenuLoad->Enable(initialized);
m_pSubMenuSave->Enable(initialized);
GetMenuBar()->FindItem(IDM_STOP)->Enable(Running || Paused);
GetMenuBar()->FindItem(IDM_RECORD)->Enable(!Initialized);
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(!Initialized);
GetMenuBar()->FindItem(IDM_FRAMESTEP)->Enable(Running || Paused);
GetMenuBar()->FindItem(IDM_SCREENSHOT)->Enable(Running || Paused);
m_pSubMenuLoad->Enable(Initialized);
m_pSubMenuSave->Enable(Initialized);
// Let's enable it by default.
//m_pSubMenuFrameSkipping->Enable(initialized);
// Misc
GetMenuBar()->FindItem(IDM_CHANGEDISC)->Enable(initialized);
GetMenuBar()->FindItem(IDM_CHANGEDISC)->Enable(Initialized);
if (DiscIO::CNANDContentManager::Access().GetNANDLoader(FULL_WII_MENU_DIR).IsValid())
GetMenuBar()->FindItem(IDM_LOAD_WII_MENU)->Enable(!initialized);
GetMenuBar()->FindItem(IDM_LOAD_WII_MENU)->Enable(!Initialized);
if (running)
if (Running)
{
if (m_ToolBar != NULL)
{
@ -919,12 +919,13 @@ void CFrame::UpdateGUI()
}
if (!initialized)
if (!Initialized)
{
if (m_GameListCtrl)
{
if (!m_GameListCtrl->IsShown())
{
m_GameListCtrl->Reparent(m_Panel);
m_GameListCtrl->Enable();
m_GameListCtrl->Show();
sizerPanel->FitInside(m_Panel);
@ -945,7 +946,7 @@ void CFrame::UpdateGUI()
// Commit changes to toolbar
if (m_ToolBar != NULL) m_ToolBar->Realize();
if (UseDebugger) g_pCodeWindow->Update();
if (g_pCodeWindow) g_pCodeWindow->Update();
// Commit changes to manager
m_Mgr->Update();
}
@ -1005,13 +1006,13 @@ void CFrame::DoToggleToolbar(bool _show)
if (_show)
{
m_Mgr->GetPane(wxT("TBMain")).Show();
if (UseDebugger) { m_Mgr->GetPane(wxT("TBDebug")).Show(); m_Mgr->GetPane(wxT("TBAui")).Show(); }
if (g_pCodeWindow) { m_Mgr->GetPane(wxT("TBDebug")).Show(); m_Mgr->GetPane(wxT("TBAui")).Show(); }
m_Mgr->Update();
}
else
{
m_Mgr->GetPane(wxT("TBMain")).Hide();
if (UseDebugger) { m_Mgr->GetPane(wxT("TBDebug")).Hide(); m_Mgr->GetPane(wxT("TBAui")).Hide(); }
if (g_pCodeWindow) { m_Mgr->GetPane(wxT("TBDebug")).Hide(); m_Mgr->GetPane(wxT("TBAui")).Hide(); }
m_Mgr->Update();
}
}

View File

@ -371,7 +371,7 @@ bool DolphinApp::OnInit()
}
/* If we have selected Automatic Start, start the default ISO, or if no default
ISO exists, start the last loaded ISO */
else if (UseDebugger)
else if (main_frame->g_pCodeWindow)
{
if (main_frame->g_pCodeWindow->AutomaticStart())
{
@ -436,6 +436,11 @@ CFrame* DolphinApp::GetCFrame()
return main_frame;
}
void Host_Message(int Id)
{
main_frame->OnCustomHostMessage(Id);
}
// OK, this thread boundary is DANGEROUS on linux
// wxPostEvent / wxAddPendingEvent is the solution.
void Host_NotifyMapLoaded()

View File

@ -56,6 +56,7 @@ void Host_NotifyMapLoaded(){}
void Host_ShowJitResults(unsigned int address){}
void Host_Message(int Id){}
void Host_UpdateLogDisplay(){}