mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
WX: HiDPI: FrameAUI / Debugger
Changes: - MemoryWindow was cleaned up and gives more feedback on searches. Some bugs were fixed as well: - A complex bug that allowed tearing off tabs and opening multiple copies of a debug panel which lead to segfaults - Another segfault related to right-click menus on code/memory views when those tools were floating in their own window.
This commit is contained in:
@ -323,14 +323,9 @@ EVT_MOVE(CFrame::OnMove)
|
||||
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
|
||||
|
||||
EVT_AUI_PANE_CLOSE(CFrame::OnPaneClose)
|
||||
EVT_AUINOTEBOOK_PAGE_CLOSE(wxID_ANY, CFrame::OnNotebookPageClose)
|
||||
EVT_AUINOTEBOOK_ALLOW_DND(wxID_ANY, CFrame::OnAllowNotebookDnD)
|
||||
EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, CFrame::OnNotebookPageChanged)
|
||||
EVT_AUINOTEBOOK_TAB_RIGHT_UP(wxID_ANY, CFrame::OnTab)
|
||||
|
||||
// Post events to child panels
|
||||
EVT_MENU_RANGE(IDM_INTERPRETER, IDM_ADDRBOX, CFrame::PostEvent)
|
||||
EVT_TEXT(IDM_ADDRBOX, CFrame::PostEvent)
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@ -643,11 +638,10 @@ void CFrame::OnClose(wxCloseEvent& event)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Close the log window now so that its settings are saved
|
||||
if (m_LogWindow)
|
||||
m_LogWindow->Close();
|
||||
m_LogWindow = nullptr;
|
||||
m_LogWindow->SaveSettings();
|
||||
}
|
||||
if (m_LogWindow)
|
||||
m_LogWindow->RemoveAllListeners();
|
||||
|
||||
// Uninit
|
||||
m_Mgr->UnInit();
|
||||
@ -745,6 +739,11 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_UPDATE_DISASM_DIALOG: // For breakpoints causing pausing
|
||||
if (!g_pCodeWindow || Core::GetState() != Core::CORE_PAUSE)
|
||||
return;
|
||||
// fallthrough
|
||||
|
||||
case IDM_UPDATE_GUI:
|
||||
UpdateGUI();
|
||||
break;
|
||||
@ -826,33 +825,29 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
|
||||
void CFrame::OnRenderWindowSizeRequest(int width, int height)
|
||||
{
|
||||
if (!Core::IsRunning() || !SConfig::GetInstance().bRenderWindowAutoSize ||
|
||||
if (!SConfig::GetInstance().bRenderWindowAutoSize || !Core::IsRunning() ||
|
||||
RendererIsFullscreen() || m_RenderFrame->IsMaximized())
|
||||
return;
|
||||
|
||||
int old_width, old_height, log_width = 0, log_height = 0;
|
||||
m_RenderFrame->GetClientSize(&old_width, &old_height);
|
||||
wxSize requested_size(width, height);
|
||||
// Convert to window pixels, since the size is from the backend it will be in framebuffer px.
|
||||
requested_size *= 1.0 / m_RenderFrame->GetContentScaleFactor();
|
||||
wxSize old_size;
|
||||
|
||||
// Add space for the log/console/debugger window
|
||||
if (SConfig::GetInstance().bRenderToMain && (SConfig::GetInstance().m_InterfaceLogWindow ||
|
||||
SConfig::GetInstance().m_InterfaceLogConfigWindow) &&
|
||||
!m_Mgr->GetPane("Pane 1").IsFloating())
|
||||
if (!SConfig::GetInstance().bRenderToMain)
|
||||
{
|
||||
switch (m_Mgr->GetPane("Pane 1").dock_direction)
|
||||
{
|
||||
case wxAUI_DOCK_LEFT:
|
||||
case wxAUI_DOCK_RIGHT:
|
||||
log_width = m_Mgr->GetPane("Pane 1").rect.GetWidth();
|
||||
break;
|
||||
case wxAUI_DOCK_TOP:
|
||||
case wxAUI_DOCK_BOTTOM:
|
||||
log_height = m_Mgr->GetPane("Pane 1").rect.GetHeight();
|
||||
break;
|
||||
}
|
||||
old_size = m_RenderFrame->GetClientSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Resize for the render panel only, this implicitly retains space for everything else
|
||||
// (i.e. log panel, toolbar, statusbar, etc) without needing to compute for them.
|
||||
old_size = m_RenderParent->GetSize();
|
||||
}
|
||||
|
||||
if (old_width != width + log_width || old_height != height + log_height)
|
||||
m_RenderFrame->SetClientSize(width + log_width, height + log_height);
|
||||
wxSize diff = requested_size - old_size;
|
||||
if (diff != wxSize())
|
||||
m_RenderFrame->SetSize(m_RenderFrame->GetSize() + diff);
|
||||
}
|
||||
|
||||
bool CFrame::RendererHasFocus()
|
||||
|
Reference in New Issue
Block a user