Win32 - Memwatch - ram monitoring fixes

This commit is contained in:
adelikat 2008-11-16 17:22:41 +00:00
parent 4119180195
commit 6c0c38ddcb
3 changed files with 14 additions and 7 deletions

View File

@ -54,7 +54,7 @@ static HMENU memwrecentmenu;
//Ram change globals------------------------
unsigned int ramChange = 0;
char editbox00current[5];
char editbox00address[5];
char editbox00last[5];
int edit00last = 0;
int edit00now = 0;
@ -691,6 +691,9 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
ScreenToClient(hwndDlg,(LPPOINT)&r);
xPositions[i] = r.left;
}
//Populate Formula pulldown
break;
case WM_PAINT:
@ -898,9 +901,10 @@ void RamChange()
MWRec& mwrec = mwrecs[0];
if(mwrec.valid && GameInfo)
{
GetDlgItemText(hwndMemWatch, MW_ADDR00, editbox00current, 6);
edit00last = edit00now;
edit00now = GetMem(mwrec.addr);
GetDlgItemText(hwndMemWatch, MW_ADDR00, editbox00address, 6); //Get Address value of edit00
SetDlgItemText(hwndMemWatch, MEMW_EDIT00RMADDRESS, editbox00address);
edit00last = edit00now; //Update last value
edit00now = GetMem(mwrec.addr); //Update now value
if (edit00now > edit00last) //If current value is > then last value
edit00count++; //Increase counter

View File

@ -846,9 +846,10 @@ BEGIN
LTEXT "Address",IDC_STATIC,6,213,26,8
LTEXT "Value",IDC_STATIC,101,213,19,8
LTEXT "Change formula",IDC_STATIC,44,213,50,8
LTEXT "01",IDC_STATIC,21,228,9,8
LTEXT " ",MEMW_EDIT00RMADDRESS,7,228,24,8
PUSHBUTTON " ",MEMW_EDIT00RESET,137,230,11,7
LTEXT "Reset",IDC_STATIC,133,213,20,8
COMBOBOX EDIT00FORMULA,45,225,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END
DEBUGGER DIALOGEX 54, 74, 548, 305

View File

@ -352,6 +352,7 @@
#define IDC_RADIO2 1139
#define IDC_RADIO3 1140
#define IDC_COMBO1 1142
#define EDIT00FORMULA 1142
#define IDC_BUTTON6 1143
#define IDC_BUTTON5 1144
#define IDC_BUTTON7 1145
@ -364,6 +365,7 @@
#define MEMW_STATIC 1181
#define MEMW_RESULTS 1184
#define MEMW_EDIT00RESET 1185
#define MEMW_EDIT00RMADDRESS 1186
#define MENU_NETWORK 40040
#define MENU_PALETTE 40041
#define MENU_SOUND 40042
@ -551,7 +553,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 124
#define _APS_NEXT_COMMAND_VALUE 40257
#define _APS_NEXT_CONTROL_VALUE 1186
#define _APS_NEXT_CONTROL_VALUE 1187
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif