RAM Search: fix reset to update previous values
RAM Search: redraw the list when search size/format is changed. Probably those are common bugs of the Gens-style RAM search dialog.
This commit is contained in:
parent
e277aa9e24
commit
ffb708a23e
|
@ -968,8 +968,13 @@ void CompactAddrs()
|
||||||
ListView_SetItemCount(GetDlgItem(RamSearchHWnd,IDC_RAMLIST),ResultCount);
|
ListView_SetItemCount(GetDlgItem(RamSearchHWnd,IDC_RAMLIST),ResultCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void soft_reset_address_info ()
|
void soft_reset_address_info (bool resetPrevValues = false)
|
||||||
{
|
{
|
||||||
|
if (resetPrevValues) {
|
||||||
|
if(s_prevValues)
|
||||||
|
memcpy(s_prevValues, s_curValues, (sizeof(*s_prevValues)*(MAX_RAM_SIZE)));
|
||||||
|
s_prevValuesNeedUpdate = false;
|
||||||
|
}
|
||||||
ResetMemoryRegions();
|
ResetMemoryRegions();
|
||||||
if(s_numChanges)
|
if(s_numChanges)
|
||||||
memset(s_numChanges, 0, (sizeof(*s_numChanges)*(MAX_RAM_SIZE)));
|
memset(s_numChanges, 0, (sizeof(*s_numChanges)*(MAX_RAM_SIZE)));
|
||||||
|
@ -1185,6 +1190,7 @@ void signal_new_size ()
|
||||||
{
|
{
|
||||||
ListView_Update(lv, -1);
|
ListView_Update(lv, -1);
|
||||||
}
|
}
|
||||||
|
InvalidateRect(lv, NULL, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1743,7 +1749,7 @@ LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
RamSearchSaveUndoStateIfNotTooBig(RamSearchHWnd);
|
RamSearchSaveUndoStateIfNotTooBig(RamSearchHWnd);
|
||||||
int prevNumItems = last_rs_possible;
|
int prevNumItems = last_rs_possible;
|
||||||
|
|
||||||
soft_reset_address_info();
|
soft_reset_address_info(true);
|
||||||
|
|
||||||
if(prevNumItems == last_rs_possible)
|
if(prevNumItems == last_rs_possible)
|
||||||
SetRamSearchUndoType(RamSearchHWnd, 0); // nothing to undo
|
SetRamSearchUndoType(RamSearchHWnd, 0); // nothing to undo
|
||||||
|
|
Loading…
Reference in New Issue