diff --git a/Windows/Debugger/CtrlMemView.cpp b/Windows/Debugger/CtrlMemView.cpp index b30a4461b1..dc4980161a 100644 --- a/Windows/Debugger/CtrlMemView.cpp +++ b/Windows/Debugger/CtrlMemView.cpp @@ -5,6 +5,7 @@ #include "../../globals.h" +#include "Core/Config.h" #include "../resource.h" #include "../../Core/MemMap.h" #include "../W32Util/Misc.h" @@ -24,14 +25,17 @@ CtrlMemView::CtrlMemView(HWND _wnd) SetWindowLongPtr(wnd, GWLP_USERDATA, (LONG)this); SetWindowLong(wnd, GWL_STYLE, GetWindowLong(wnd,GWL_STYLE) | WS_VSCROLL); SetScrollRange(wnd, SB_VERT, -1,1,TRUE); + + rowHeight = g_Config.iFontHeight; + charWidth = g_Config.iFontWidth; + font = - CreateFont(12,8,0,0,FW_DONTCARE,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH, - "Lucida Console"); + CreateFont(rowHeight,charWidth,0,0,FW_DONTCARE,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Lucida Console"); underlineFont = - CreateFont(12,8,0,0,FW_DONTCARE,FALSE,TRUE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH, - "Lucida Console"); + CreateFont(rowHeight,charWidth,0,0,FW_DONTCARE,FALSE,TRUE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Lucida Console"); curAddress=0; - rowHeight=12; mode=MV_NORMAL; debugger = 0; @@ -41,7 +45,6 @@ CtrlMemView::CtrlMemView(HWND _wnd) asciiSelected = false; selectedNibble = 0; - charWidth = 8; rowSize = 16; addressStart = charWidth; hexStart = addressStart + 9*charWidth; diff --git a/Windows/Debugger/CtrlRegisterList.cpp b/Windows/Debugger/CtrlRegisterList.cpp index 385f940919..9b3cff788a 100644 --- a/Windows/Debugger/CtrlRegisterList.cpp +++ b/Windows/Debugger/CtrlRegisterList.cpp @@ -11,6 +11,7 @@ #include "CtrlRegisterList.h" #include "Debugger_MemoryDlg.h" +#include "Core/Config.h" #include "../../globals.h" #include "Debugger_Disasm.h" #include "DebuggerShared.h" @@ -127,9 +128,11 @@ CtrlRegisterList::CtrlRegisterList(HWND _wnd) SetWindowLongPtr(wnd, GWLP_USERDATA, (LONG_PTR)this); //SetWindowLong(wnd, GWL_STYLE, GetWindowLong(wnd,GWL_STYLE) | WS_VSCROLL); //SetScrollRange(wnd, SB_VERT, -1,1,TRUE); - font = CreateFont(12,0,0,0,FW_DONTCARE,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH, - "Lucida Console"); - rowHeight=12; + + rowHeight=g_Config.iFontHeight; + + font = CreateFont(rowHeight,g_Config.iFontWidth,0,0,FW_DONTCARE,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY,DEFAULT_PITCH,"Lucida Console"); selecting=false; selection=0; category=0;