win32 - debugger - added an auto-load feature

This commit is contained in:
adelikat 2009-11-05 04:36:46 +00:00
parent bf14da0052
commit 2cf4d23994
7 changed files with 25 additions and 5 deletions

View File

@ -1,4 +1,4 @@
04-nov-2009 - adelikat - win32 - debugger - added an auto-load feature
---r1527 - FCEUX 2.1.2 Released---
---November 3, 2009---

View File

@ -37,6 +37,7 @@
#include "texthook.h"
#include "movieoptions.h"
#include "ramwatch.h"
#include "debugger.h"
extern CFGSTRUCT NetplayConfig[];
extern CFGSTRUCT InputConfig[];
@ -219,7 +220,7 @@ static CFGSTRUCT fceuconfig[] = {
AC(BindToMain),
AC(EnableAutosave),
AC(frameAdvanceLagSkip),
AC(debuggerAutoload),
AC(allowUDLR),
//window positions

View File

@ -65,6 +65,8 @@ HWND hDebug;
static HFONT hFont;
static SCROLLINFO si;
bool debuggerAutoload = false;
#define INVALID_START_OFFSET 1
#define INVALID_END_OFFSET 2
@ -953,6 +955,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
//these messages get handled at any time
switch(uMsg) {
case WM_INITDIALOG: {
CheckDlgButton(hwndDlg, DEBUGAUTOLOAD, debuggerAutoload ? MF_CHECKED : MF_UNCHECKED);
extern int loadDebugDataFailed;
if (DbgPosX==-32000) DbgPosX=0; //Just in case
if (DbgPosY==-32000) DbgPosY=0;
@ -1081,6 +1084,15 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
DbgPosX = wrect.left;
DbgPosY = wrect.top;
break;
//adelikat: Buttons that don't need a rom loaded to do something, such as autoload
case WM_COMMAND:
switch(LOWORD(wParam))
{
case DEBUGAUTOLOAD:
debuggerAutoload ^= 1;
break;
}
}
//these messages only get handled when a game is loaded

View File

@ -18,6 +18,7 @@ extern int scanline; //current scanline! :D
extern HWND hDebug;
extern int childwnd,numWPs; //mbg merge 7/18/06 had to make extern
extern bool debuggerAutoload;
void CenterWindow(HWND hwndDlg);
void DoPatcher(int address,HWND hParent);

View File

@ -1021,6 +1021,7 @@ BEGIN
PUSHBUTTON "Run Line",IDC_DEBUGGER_RUN_LINE,349,39,37,14
PUSHBUTTON "128 Lines",IDC_DEBUGGER_RUN_FRAME2,389,39,37,14
LTEXT "Scanline: PPU Pixel:",IDC_STATIC,436,191,78,8
CONTROL "Auto-load",DEBUGAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,495,308,46,10
END
TRACER DIALOGEX 65527, 65513, 398, 319

View File

@ -413,6 +413,7 @@
#define ID_SOUND_QUALITYNOTIFY 1202
#define IDC_CHECK1 1203
#define CB_ENABLECONTEXTMENU 1203
#define DEBUGAUTOLOAD 1203
#define IDC_VOLUMEGROUP 1204
#define IDC_RAMLIST 1205
#define IDC_C_SEARCH 1206

View File

@ -1044,9 +1044,13 @@ bool ALoad(char *nameo, char* innerFilename)
if (AutoRWLoad)
{
if (AutoRWLoad) OpenRWRecentFile(0); //adelikat: TODO: This command should be called internally from the RamWatch dialog in order for it to be more portable
OpenRWRecentFile(0); //adelikat: TODO: This command should be called internally from the RamWatch dialog in order for it to be more portable
OpenRamWatch();
}
if (debuggerAutoload)
{
DoDebug(0);
}
}
else
{