mirror of https://github.com/PCSX2/pcsx2.git
Scale the font size in debugger controls with DPI
This commit is contained in:
parent
1fe15c16cc
commit
be0ad9be2f
|
@ -23,6 +23,7 @@
|
|||
#include "BreakpointWindow.h"
|
||||
#include "AppConfig.h"
|
||||
#include "System.h"
|
||||
#include "DisassemblyDialog.h"
|
||||
|
||||
#include <wx/mstream.h>
|
||||
#include <wx/clipbrd.h>
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "BreakpointWindow.h"
|
||||
#include "DebugEvents.h"
|
||||
#include "DisassemblyDialog.h"
|
||||
#include <wchar.h>
|
||||
#include <wx/clipbrd.h>
|
||||
|
||||
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue