From 74f3bb2aa9e7090f08eea75875296abd14044434 Mon Sep 17 00:00:00 2001 From: Ty Lamontagne Date: Fri, 5 Nov 2021 01:31:13 -0400 Subject: [PATCH] Debugger: Make the register list DPI aware --- pcsx2/gui/Debugger/CtrlRegisterList.cpp | 4 ++-- pcsx2/gui/Debugger/CtrlRegisterList.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pcsx2/gui/Debugger/CtrlRegisterList.cpp b/pcsx2/gui/Debugger/CtrlRegisterList.cpp index 1f1292c021..ef532a3d3b 100644 --- a/pcsx2/gui/Debugger/CtrlRegisterList.cpp +++ b/pcsx2/gui/Debugger/CtrlRegisterList.cpp @@ -74,8 +74,8 @@ CtrlRegisterList::CtrlRegisterList(wxWindow* parent, DebugInterface* _cpu) SetDoubleBuffered(true); const wxSize optSize = getOptimalSize(); - SetVirtualSize(optSize); - SetScrollbars(1, rowHeight, optSize.x, optSize.y / rowHeight, 0, 0); + SetVirtualSize(optSize.x,optSize.y); + SetScrollbars(1, rowHeight, optSize.x, optSize.y * MSW_GetDPIScale() / rowHeight, 0, 0); } CtrlRegisterList::~CtrlRegisterList() diff --git a/pcsx2/gui/Debugger/CtrlRegisterList.h b/pcsx2/gui/Debugger/CtrlRegisterList.h index ef7288376b..676176f172 100644 --- a/pcsx2/gui/Debugger/CtrlRegisterList.h +++ b/pcsx2/gui/Debugger/CtrlRegisterList.h @@ -16,6 +16,7 @@ #pragma once #include +#include "gui/MSWstuff.h" // Required for MSW_GetDPIScale() #include "DebugTools/DebugInterface.h" #include "DebugTools/DisassemblyManager.h" @@ -38,7 +39,7 @@ public: if (GetWindowStyle() & wxVSCROLL) optimalSize.x += wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); - return wxSize(optimalSize.x, 0); + return wxSize(optimalSize.x * MSW_GetDPIScale(), 0); } virtual wxSize DoGetBestClientSize() const