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
bd43e2b6b5
commit
f52d36a04b
|
@ -997,8 +997,12 @@ 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) {
|
||||||
|
memcpy(buffers->s_prevValues, buffers->s_curValues, sizeof(buffers->s_prevValues));
|
||||||
|
s_prevValuesNeedUpdate = false;
|
||||||
|
}
|
||||||
ResetMemoryRegions();
|
ResetMemoryRegions();
|
||||||
memset(buffers->s_numChanges, 0, sizeof(buffers->s_numChanges));
|
memset(buffers->s_numChanges, 0, sizeof(buffers->s_numChanges));
|
||||||
CompactAddrs();
|
CompactAddrs();
|
||||||
|
@ -1150,6 +1154,7 @@ void signal_new_size ()
|
||||||
{
|
{
|
||||||
ListView_Update(lv, -1);
|
ListView_Update(lv, -1);
|
||||||
}
|
}
|
||||||
|
InvalidateRect(lv, NULL, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1698,7 +1703,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