debugger window remembers its size

This commit is contained in:
zeromus 2008-08-07 00:10:55 +00:00
parent 1efc95ef64
commit 6161b33eb0
4 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,6 @@
---version 2.0.2 released---
06-aug-2008 - zeromus - add memory.readbyterange to emulua
06-aug-2008 - zeromus - auto-fill .fcs extension in save state as dialog
06-aug-2008 - zeromus - mmc5 - 64KB games now work correctly
06-aug-2008 - zeromus - mmc5 - use of chr A regs for BG in sprite 8x8 mode is fixed

View File

@ -40,9 +40,10 @@ extern int autoHoldKey, autoHoldClearKey;
extern uint8 gNoBGFillColor;
//window positions:
//window positions and sizes:
extern int ChtPosX,ChtPosY;
extern int DbgPosX,DbgPosY;
extern int DbgSizeX,DbgSizeY;
extern int MemView_wndx, MemView_wndy;
extern int MemFind_wndx, MemFind_wndy;
extern int NTViewPosX,NTViewPosY;
@ -162,6 +163,8 @@ static CFGSTRUCT fceuconfig[] = {
AC(ChtPosY),
AC(DbgPosX),
AC(DbgPosY),
AC(DbgSizeX),
AC(DbgSizeY),
AC(MemView_wndx),
AC(MemView_wndy),
AC(MemFind_wndx),

View File

@ -51,6 +51,7 @@ int childwnd;
extern readfunc ARead[0x10000];
int DbgPosX,DbgPosY;
int DbgSizeX=-1,DbgSizeY=-1;
int WP_edit=-1;
int ChangeWait=0,ChangeWait2=0;
uint8 debugger_open=0;
@ -857,7 +858,8 @@ BOOL CALLBACK DebuggerEnumWindowsProc(HWND hwnd, LPARAM lParam)
SetWindowPos(hwnd,0,0,0,crect.right-crect.left,crect.bottom-crect.top,SWP_NOZORDER | SWP_NOMOVE);
} else if(hwnd == addrline) {
crect.top += dy;
SetWindowPos(hwnd,0,crect.left,crect.top,0,0,SWP_NOZORDER | SWP_NOSIZE);
crect.right += dx;
SetWindowPos(hwnd,0,crect.left,crect.top,crect.right-crect.left,crect.bottom-crect.top,SWP_NOZORDER);
} else if(hwnd == vscr) {
crect.bottom += dy;
crect.left += dx;
@ -884,6 +886,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
extern int loadDebugDataFailed;
SetWindowPos(hwndDlg,0,DbgPosX,DbgPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
GetWindowRect(hwndDlg,&currDebuggerRect);
si.cbSize = sizeof(SCROLLINFO);
@ -960,6 +963,8 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
case WM_SIZE: {
GetWindowRect(hwndDlg,&newDebuggerRect);
DbgSizeX = newDebuggerRect.right-newDebuggerRect.left;
DbgSizeY = newDebuggerRect.bottom-newDebuggerRect.top;
EnumChildWindows(hwndDlg,DebuggerEnumWindowsProc,0);
currDebuggerRect = newDebuggerRect;
InvalidateRect(hwndDlg,0,TRUE);
@ -1317,7 +1322,11 @@ void UpdatePatcher(HWND hwndDlg){
}
void DoDebug(uint8 halt) {
if (!debugger_open) hDebug = CreateDialog(fceu_hInstance,"DEBUGGER",NULL,DebuggerCallB);
if (!debugger_open) {
hDebug = CreateDialog(fceu_hInstance,"DEBUGGER",NULL,DebuggerCallB);
if(DbgSizeX != -1 && DbgSizeY != -1)
SetWindowPos(hDebug,0,0,0,DbgSizeX,DbgSizeY,SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER);
}
if (hDebug) {
SetWindowPos(hDebug,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
if (GameInfo) UpdateDebugger();

View File

@ -872,7 +872,7 @@ BEGIN
EDITTEXT IDC_DEBUGGER_VAL_PPU,367,182,25,12,ES_UPPERCASE | ES_WANTRETURN
EDITTEXT IDC_DEBUGGER_VAL_SPR,417,182,15,12,ES_UPPERCASE | ES_WANTRETURN
LTEXT "Scanline:",IDC_DEBUGGER_VAL_SLINE,435,183,50,10
LTEXT "",IDC_DEBUGGER_ADDR_LINE,5,295,538,10
CONTROL "",IDC_DEBUGGER_ADDR_LINE,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,5,295,328,10
CONTROL "Break on Bad Opcode",IDC_DEBUGGER_BREAK_ON_BAD_OP,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,437,118,90,10
CONTROL "Symbolic debugging",IDC_DEBUGGER_ENABLE_SYMBOLIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,347,200,79,10
@ -883,7 +883,7 @@ BEGIN
PUSHBUTTON "Add",IDC_DEBUGGER_BOOKMARK_ADD,421,239,40,14
PUSHBUTTON "Delete",IDC_DEBUGGER_BOOKMARK_DEL,421,255,40,14
PUSHBUTTON "Rom Patcher",IDC_DEBUGGER_ROM_PATCHER,489,198,49,14
CONTROL "",IDC_DEBUGGER_ICONTRAY,"Static",SS_BLACKFRAME,5,6,10,289
CONTROL "",IDC_DEBUGGER_ICONTRAY,"Static",SS_BLACKFRAME,5,7,10,287
END
TRACER DIALOGEX 65527, 65513, 398, 319