diff --git a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp index 9247557555..d90a476317 100644 --- a/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp +++ b/pcsx2/gui/Debugger/CtrlDisassemblyView.cpp @@ -23,6 +23,7 @@ #include "BreakpointWindow.h" #include "AppConfig.h" #include "System.h" +#include "DisassemblyDialog.h" #include #include @@ -147,8 +148,8 @@ CtrlDisassemblyView::CtrlDisassemblyView(wxWindow* parent, DebugInterface* _cpu) { manager.setCpu(cpu); windowStart = 0x100000; - rowHeight = g_Conf->EmuOptions.Debugger.FontHeight+2; - charWidth = g_Conf->EmuOptions.Debugger.FontWidth; + rowHeight = getDebugFontHeight()+2; + charWidth = getDebugFontWidth(); displaySymbols = true; visibleRows = 1; diff --git a/pcsx2/gui/Debugger/CtrlMemView.cpp b/pcsx2/gui/Debugger/CtrlMemView.cpp index 064755542b..93950b66ca 100644 --- a/pcsx2/gui/Debugger/CtrlMemView.cpp +++ b/pcsx2/gui/Debugger/CtrlMemView.cpp @@ -20,6 +20,7 @@ #include "BreakpointWindow.h" #include "DebugEvents.h" +#include "DisassemblyDialog.h" #include #include @@ -55,8 +56,8 @@ enum MemoryViewMenuIdentifiers CtrlMemView::CtrlMemView(wxWindow* parent, DebugInterface* _cpu) : wxWindow(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxWANTS_CHARS|wxVSCROLL), cpu(_cpu) { - rowHeight = g_Conf->EmuOptions.Debugger.FontHeight; - charWidth = g_Conf->EmuOptions.Debugger.FontWidth; + rowHeight = getDebugFontHeight(); + charWidth = getDebugFontWidth(); windowStart = 0x480000; curAddress = windowStart; rowSize = 16; diff --git a/pcsx2/gui/Debugger/CtrlRegisterList.cpp b/pcsx2/gui/Debugger/CtrlRegisterList.cpp index 2991a02a76..1469ec66ea 100644 --- a/pcsx2/gui/Debugger/CtrlRegisterList.cpp +++ b/pcsx2/gui/Debugger/CtrlRegisterList.cpp @@ -19,6 +19,7 @@ #include "DebugEvents.h" #include "AppConfig.h" +#include "DisassemblyDialog.h" BEGIN_EVENT_TABLE(CtrlRegisterList, wxWindow) EVT_PAINT(CtrlRegisterList::paintEvent) @@ -43,8 +44,8 @@ enum DisassemblyMenuIdentifiers CtrlRegisterList::CtrlRegisterList(wxWindow* parent, DebugInterface* _cpu) : wxWindow(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxWANTS_CHARS|wxBORDER_NONE), cpu(_cpu) { - rowHeight = g_Conf->EmuOptions.Debugger.FontHeight+2; - charWidth = g_Conf->EmuOptions.Debugger.FontWidth; + rowHeight = getDebugFontHeight()+2; + charWidth = getDebugFontWidth(); category = 0; maxBits = 128; lastPc = 0xFFFFFFFF; diff --git a/pcsx2/gui/Debugger/DisassemblyDialog.h b/pcsx2/gui/Debugger/DisassemblyDialog.h index 2dcd9fad04..0406934184 100644 --- a/pcsx2/gui/Debugger/DisassemblyDialog.h +++ b/pcsx2/gui/Debugger/DisassemblyDialog.h @@ -23,6 +23,7 @@ #include "CtrlMemView.h" #include "DebugEvents.h" #include "DebuggerLists.h" +#include "../MSWstuff.h" class DebuggerHelpDialog: public wxDialog { @@ -30,6 +31,16 @@ public: DebuggerHelpDialog(wxWindow* parent); }; +inline int getDebugFontWidth() +{ + return (int) ceil(g_Conf->EmuOptions.Debugger.FontWidth*MSW_GetDPIScale()); +} + +inline int getDebugFontHeight() +{ + return (int)ceil(g_Conf->EmuOptions.Debugger.FontHeight*MSW_GetDPIScale()); +} + class CpuTabPage: public wxPanel { public: