* Debugger: "Symbolic Debug" state is now saved in global fceux.cfg instead of different .deb files
* Debugger: debuggerFontSize can be specified in fceux.cfg * Hexeditor: hexeditorFontSize can be specified in fceux.cfg
This commit is contained in:
parent
df5132609e
commit
a6c62b4b5f
|
@ -73,6 +73,7 @@ extern bool oldInputDisplay;
|
|||
extern bool fullSaveStateLoads;
|
||||
extern int frameSkipAmt;
|
||||
extern int32 fps_scale_frameadvance;
|
||||
extern bool symbDebugEnabled;
|
||||
|
||||
extern TASEDITOR_CONFIG taseditorConfig;
|
||||
extern char* recentProjectsArray[];
|
||||
|
@ -271,8 +272,11 @@ static CFGSTRUCT fceuconfig[] =
|
|||
AC(frameAdvanceLagSkip),
|
||||
AC(debuggerAutoload),
|
||||
AC(allowUDLR),
|
||||
AC(symbDebugEnabled),
|
||||
AC(debuggerSaveLoadDEBFiles),
|
||||
AC(debuggerDisplayROMoffsets),
|
||||
AC(debuggerFontSize),
|
||||
AC(hexeditorFontSize),
|
||||
AC(fullSaveStateLoads),
|
||||
AC(frameSkipAmt),
|
||||
AC(fps_scale_frameadvance),
|
||||
|
|
|
@ -1560,12 +1560,12 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
//setup font
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_DISASSEMBLY,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_DISASSEMBLY_LEFT_PANEL,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_A,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_X,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_Y,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PC,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
//SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_A,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
//SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_X,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
//SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_Y,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
//SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PC,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_STACK_CONTENTS,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PCSEEK,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
//SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_VAL_PCSEEK,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
SendDlgItemMessage(hwndDlg,IDC_DEBUGGER_BP_LIST,WM_SETFONT,(WPARAM)debugSystem->hFixedFont,FALSE);
|
||||
|
||||
//text limits
|
||||
|
@ -2233,17 +2233,23 @@ void DoDebug(uint8 halt)
|
|||
|
||||
//-----------------------------------------
|
||||
DebugSystem* debugSystem;
|
||||
unsigned int debuggerFontSize = 15;
|
||||
unsigned int hexeditorFontSize = 15;
|
||||
|
||||
DebugSystem::DebugSystem()
|
||||
{
|
||||
hFixedFont = CreateFont(FIXED_FONT_HEIGHT, 8, /*Height,Width*/
|
||||
}
|
||||
|
||||
void DebugSystem::init()
|
||||
{
|
||||
hFixedFont = CreateFont(debuggerFontSize, debuggerFontSize / 2, /*Height,Width*/
|
||||
0,0, /*escapement,orientation*/
|
||||
FW_REGULAR,FALSE,FALSE,FALSE, /*weight, italic, underline, strikeout*/
|
||||
ANSI_CHARSET,OUT_DEVICE_PRECIS,CLIP_MASK, /*charset, precision, clipping*/
|
||||
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
|
||||
"Courier New"); /*font name*/
|
||||
|
||||
hHexeditorFont = CreateFont(14, 8, /*Height,Width*/
|
||||
hHexeditorFont = CreateFont(hexeditorFontSize, hexeditorFontSize / 2, /*Height,Width*/
|
||||
0,0, /*escapement,orientation*/
|
||||
FW_REGULAR,FALSE,FALSE,FALSE, /*weight, italic, underline, strikeout*/
|
||||
ANSI_CHARSET,OUT_DEVICE_PRECIS,CLIP_MASK, /*charset, precision, clipping*/
|
||||
|
@ -2268,7 +2274,15 @@ DebugSystem::DebugSystem()
|
|||
|
||||
DebugSystem::~DebugSystem()
|
||||
{
|
||||
DeleteObject(hFixedFont);
|
||||
DeleteObject(hHexeditorFont);
|
||||
if (hFixedFont)
|
||||
{
|
||||
DeleteObject(hFixedFont);
|
||||
hFixedFont = 0;
|
||||
}
|
||||
if (hHexeditorFont)
|
||||
{
|
||||
DeleteObject(hHexeditorFont);
|
||||
hHexeditorFont = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
#include <windows.h>
|
||||
//#include "debug.h"
|
||||
|
||||
// this is default value, but use debugSystem->fixedFontHeight in calculations
|
||||
#define FIXED_FONT_HEIGHT 14
|
||||
|
||||
// TODO: Maybe change breakpoint array to std::vector
|
||||
// Maximum number of breakpoints supported
|
||||
#define MAXIMUM_NUMBER_OF_BREAKPOINTS 64
|
||||
|
@ -25,6 +22,9 @@ extern bool debuggerAutoload;
|
|||
extern bool debuggerSaveLoadDEBFiles;
|
||||
extern bool debuggerDisplayROMoffsets;
|
||||
|
||||
extern unsigned int debuggerFontSize;
|
||||
extern unsigned int hexeditorFontSize;
|
||||
|
||||
void CenterWindow(HWND hwndDlg);
|
||||
void DoPatcher(int address,HWND hParent);
|
||||
void UpdatePatcher(HWND hwndDlg);
|
||||
|
@ -49,6 +49,8 @@ public:
|
|||
DebugSystem();
|
||||
~DebugSystem();
|
||||
|
||||
void init();
|
||||
|
||||
HFONT hFixedFont;
|
||||
int fixedFontWidth;
|
||||
int fixedFontHeight;
|
||||
|
|
|
@ -40,7 +40,7 @@ int lastBank = -1;
|
|||
int loadedBank = -1;
|
||||
extern char LoadedRomFName[2048];
|
||||
char NLfilename[2048];
|
||||
char symbDebugEnabled = 0;
|
||||
bool symbDebugEnabled = false;
|
||||
int debuggerWasActive = 0;
|
||||
char temp_chr[40] = {0};
|
||||
char delimiterChar[2] = "#";
|
||||
|
|
|
@ -32,7 +32,7 @@ struct Name
|
|||
char* comment;
|
||||
};
|
||||
|
||||
extern char symbDebugEnabled;
|
||||
extern bool symbDebugEnabled;
|
||||
extern std::vector<unsigned int> bookmarks_addr;
|
||||
extern std::vector<std::string> bookmarks_name;
|
||||
extern int debuggerWasActive;
|
||||
|
|
|
@ -627,7 +627,6 @@ int main(int argc,char *argv[])
|
|||
}
|
||||
|
||||
InitCommonControls();
|
||||
debugSystem = new DebugSystem();
|
||||
|
||||
if(!FCEUI_Initialize())
|
||||
{
|
||||
|
@ -748,6 +747,9 @@ int main(int argc,char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
debugSystem = new DebugSystem();
|
||||
debugSystem->init();
|
||||
|
||||
InitSpeedThrottle();
|
||||
|
||||
if (t)
|
||||
|
|
|
@ -160,7 +160,7 @@ int MemFind_wndx, MemFind_wndy;
|
|||
bool MemView_HighlightActivity = true;
|
||||
unsigned int MemView_HighlightActivity_FadingPeriod = HIGHLIGHT_ACTIVITY_NUM_COLORS;
|
||||
bool MemView_HighlightActivity_FadeWhenPaused = false;
|
||||
int MemViewSizeX = 580, MemViewSizeY = 248;
|
||||
int MemViewSizeX = 630, MemViewSizeY = 300;
|
||||
static RECT newMemViewRect;
|
||||
|
||||
static char chartable[256];
|
||||
|
|
|
@ -34,8 +34,6 @@ extern uint64 break_cycles_limit;
|
|||
extern bool break_on_instructions;
|
||||
extern uint64 break_instructions_limit;
|
||||
|
||||
extern char symbDebugEnabled;
|
||||
|
||||
/**
|
||||
* Stores debugger preferences in a file
|
||||
*
|
||||
|
@ -48,9 +46,6 @@ int storeDebuggerPreferences(FILE* f)
|
|||
unsigned int size, len;
|
||||
uint8 tmp;
|
||||
|
||||
// Flag that says whether symbolic debugging should be enabled
|
||||
if (fwrite(&symbDebugEnabled, 1, 1, f) != 1) return 1;
|
||||
|
||||
// Write the number of CPU bookmarks
|
||||
size = bookmarks_addr.size();
|
||||
bookmarks_name.resize(size);
|
||||
|
@ -232,9 +227,6 @@ int loadDebuggerPreferences(FILE* f)
|
|||
unsigned int i, size, len;
|
||||
uint8 tmp;
|
||||
|
||||
// Read flag that says if symbolic debugging is enabled
|
||||
if (fread(&symbDebugEnabled, sizeof(symbDebugEnabled), 1, f) != 1) return 1;
|
||||
|
||||
// Read the number of CPU bookmarks
|
||||
if (fread(&size, sizeof(unsigned int), 1, f) != 1) return 1;
|
||||
bookmarks_addr.resize(size);
|
||||
|
|
|
@ -422,7 +422,7 @@ BOOL CALLBACK TracerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
tracesi.nPos -= i;
|
||||
if ((tracesi.nPos + (int)tracesi.nPage) > tracesi.nMax)
|
||||
tracesi.nPos = tracesi.nMax - tracesi.nPage;
|
||||
else if (tracesi.nPos < tracesi.nMin)
|
||||
if (tracesi.nPos < tracesi.nMin)
|
||||
tracesi.nPos = tracesi.nMin;
|
||||
SetScrollInfo(GetDlgItem(hTracer, IDC_SCRL_TRACER_LOG), SB_CTL, &tracesi, TRUE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue