MCPcopy Create free account
hub / github.com/TASEmulators/fceux / Update_RAM_Search

Function Update_RAM_Search

src/drivers/win/ram_search.cpp:1261–1349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261void Update_RAM_Search() //keeps RAM values up to date in the search and watch windows
1262{
1263 if(disableRamSearchUpdate)
1264 return;
1265
1266 int prevValuesNeededUpdate;
1267 if (AutoSearch && !ResultCount)
1268 {
1269 if(!AutoSearchAutoRetry)
1270 {
1271// Clear_Sound_Buffer();
1272 int answer = MessageBox(RamSearchHWnd,"Choosing Retry will reset the search once and continue autosearching.\nChoose Ignore will reset the search whenever necessary and continue autosearching.\nChoosing Abort will reset the search once and stop autosearching.","Autosearch - out of results.",MB_ABORTRETRYIGNORE|MB_DEFBUTTON2|MB_ICONINFORMATION);
1273 if(answer == IDABORT)
1274 {
1275 SendDlgItemMessage(RamSearchHWnd, IDC_C_AUTOSEARCH, BM_SETCHECK, BST_UNCHECKED, 0);
1276 SendMessage(RamSearchHWnd, WM_COMMAND, IDC_C_AUTOSEARCH, 0);
1277 }
1278 if(answer == IDIGNORE)
1279 AutoSearchAutoRetry = true;
1280 }
1281 reset_address_info();
1282 prevValuesNeededUpdate = s_prevValuesNeedUpdate;
1283 }
1284 else
1285 {
1286 prevValuesNeededUpdate = s_prevValuesNeedUpdate;
1287 if (RamSearchHWnd)
1288 {
1289 // update active RAM values
1290 signal_new_frame();
1291 }
1292
1293 if (AutoSearch && ResultCount)
1294 {
1295 //Clear_Sound_Buffer();
1296 if(!rs_val_valid)
1297 rs_val_valid = Set_RS_Val();
1298 if(rs_val_valid)
1299 prune(rs_c,rs_o,rs_t=='s',rs_val,rs_param);
1300 }
1301 }
1302
1303 if(RamSearchHWnd)
1304 {
1305 HWND lv = GetDlgItem(RamSearchHWnd,IDC_RAMLIST);
1306 if(prevValuesNeededUpdate != s_prevValuesNeedUpdate)
1307 {
1308 // previous values got updated, refresh everything visible
1309 ListView_Update(lv, -1);
1310 }
1311 else
1312 {
1313 // refresh any visible parts of the listview box that changed
1314 static int changes[128];
1315 int top = ListView_GetTopIndex(lv);
1316 int count = ListView_GetCountPerPage(lv);
1317 int start = -1;
1318 for(int i = top; i <= top+count; i++)

Callers 6

FCEUSS_LoadFunction · 0.85
FCEUI_EmulateFunction · 0.85
PowerNESFunction · 0.85
RamSearchProcFunction · 0.85
jumpMethod · 0.85

Calls 5

reset_address_infoFunction · 0.85
signal_new_frameFunction · 0.85
Set_RS_ValFunction · 0.85
pruneFunction · 0.85
Update_RAM_WatchFunction · 0.85

Tested by

no test coverage detected