diff options
| author | shuffle2 <godisgovernment@gmail.com> | 2014-09-06 11:43:50 -0700 |
|---|---|---|
| committer | shuffle2 <godisgovernment@gmail.com> | 2014-09-06 11:43:50 -0700 |
| commit | 87b6c8d99102a2424948386ac9cd4bb0b0ba781e (patch) | |
| tree | 7406529a0a46ab7cef8c20134cf400ab1393c22d /Source/Core/DolphinWX/Frame.cpp | |
| parent | e8aa1fe052a0a6647b4a0a485616136615f8a409 (diff) | |
| parent | 7308b809d8d57020d18b82b8718d24877e2b6581 (diff) | |
Merge pull request #988 from shuffle2/hide-menubar
Fix render to main crashing in fullscreen.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 7885986fb2..5a2c09b7fd 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -318,7 +318,7 @@ CFrame::CFrame(wxFrame* parent, long style) : CRenderFrame(parent, id, title, pos, size, style) , g_pCodeWindow(nullptr), g_NetPlaySetupDiag(nullptr), g_CheatsWindow(nullptr) - , m_SavedPerspectives(nullptr), m_ToolBar(nullptr) + , m_menubar_shadow(nullptr), m_SavedPerspectives(nullptr), m_ToolBar(nullptr) , m_GameListCtrl(nullptr), m_Panel(nullptr) , m_RenderFrame(nullptr), m_RenderParent(nullptr) , m_LogWindow(nullptr), m_LogConfigWindow(nullptr) @@ -353,7 +353,10 @@ CFrame::CFrame(wxFrame* parent, GetStatusBar()->Hide(); // Give it a menu bar - CreateMenu(); + wxMenuBar* menubar_active = CreateMenu(); + SetMenuBar(menubar_active); + // Create a menubar to service requests while the real menubar is hidden from the screen + m_menubar_shadow = CreateMenu(); // --------------- // Main panel @@ -450,6 +453,10 @@ CFrame::~CFrame() ClosePages(); delete m_Mgr; + + // This object is owned by us, not wxw + m_menubar_shadow->Destroy(); + m_menubar_shadow = nullptr; } bool CFrame::RendererIsFullscreen() @@ -1271,9 +1278,9 @@ void CFrame::DoFullscreen(bool enable_fullscreen) DoToggleToolbar(SConfig::GetInstance().m_InterfaceToolbar); // Recreate the menubar if needed. - if (GetMenuBar() == nullptr) + if (wxFrame::GetMenuBar() == nullptr) { - CreateMenu(); + SetMenuBar(CreateMenu()); } // Show statusbar if enabled |
