diff --git a/desmume/src/windows/ram_search.cpp b/desmume/src/windows/ram_search.cpp index fed54396a..627054245 100644 --- a/desmume/src/windows/ram_search.cpp +++ b/desmume/src/windows/ram_search.cpp @@ -997,8 +997,12 @@ void CompactAddrs() 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(); memset(buffers->s_numChanges, 0, sizeof(buffers->s_numChanges)); CompactAddrs(); @@ -1150,6 +1154,7 @@ void signal_new_size () { 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); int prevNumItems = last_rs_possible; - soft_reset_address_info(); + soft_reset_address_info(true); if(prevNumItems == last_rs_possible) SetRamSearchUndoType(RamSearchHWnd, 0); // nothing to undo