Added logic to allow for RAM watch display updates to be non-destructive.
This commit is contained in:
parent
4490f650f1
commit
b4f4f816d7
|
@ -2288,16 +2288,25 @@ static void openCheatsWindow(void)
|
|||
// Ram Watch Window
|
||||
//*******************************************************************************************************
|
||||
//
|
||||
static void showRamWatchResults(void)
|
||||
static void showRamWatchResults(int reset)
|
||||
{
|
||||
std::list <ramWatch_t*>::iterator it;
|
||||
GtkTreeIter iter;
|
||||
char addrStr[32], valStr1[16], valStr2[16];
|
||||
ramWatch_t *rw;
|
||||
|
||||
|
||||
|
||||
if ( reset )
|
||||
{
|
||||
gtk_tree_store_clear(ram_watch_store);
|
||||
|
||||
gtk_tree_store_append( ram_watch_store, &iter, NULL); // aquire iter
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_tree_model_get_iter_first( GTK_TREE_MODEL(ram_watch_store), &iter );
|
||||
}
|
||||
|
||||
for (it=ramWatchList.ls.begin(); it!=ramWatchList.ls.end(); it++)
|
||||
{
|
||||
|
@ -2329,8 +2338,15 @@ static void showRamWatchResults(void)
|
|||
0, addrStr, 1, valStr1, 2, valStr2, 3, rw->name.c_str(),
|
||||
-1);
|
||||
|
||||
if ( reset )
|
||||
{
|
||||
gtk_tree_store_append( ram_watch_store, &iter, NULL); // aquire iter
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_tree_model_iter_next( GTK_TREE_MODEL(ram_watch_store), &iter );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void openWatchFile()
|
||||
|
@ -2570,14 +2586,14 @@ static void newRamWatch( GtkButton *button,
|
|||
|
||||
ramWatchList.add_entry( name, addr, type, size );
|
||||
|
||||
showRamWatchResults();
|
||||
showRamWatchResults(1);
|
||||
}
|
||||
|
||||
static gint updateRamWatchTree( void *userData )
|
||||
{
|
||||
//static uint32_t c = 0;
|
||||
//printf("RamWatch: %u\n", c++ );
|
||||
showRamWatchResults();
|
||||
showRamWatchResults(0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue