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

Function removeCheatFromActive

src/drivers/sdl/cheat.cpp:654–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652}
653
654static void removeCheatFromActive (GtkWidget * widget, cheat_win_t * cw)
655{
656 int numListRows;
657 GList *selListRows, *tmpList;
658 GtkTreeModel *model = NULL;
659 GtkTreeSelection *treeSel;
660
661 treeSel =
662 gtk_tree_view_get_selection (GTK_TREE_VIEW
663 (cw->actv_cheat_tree));
664
665 numListRows = gtk_tree_selection_count_selected_rows (treeSel);
666
667 if (numListRows == 0)
668 {
669 return;
670 }
671 //printf("Number of Rows Selected: %i\n", numListRows );
672
673 selListRows = gtk_tree_selection_get_selected_rows (treeSel, &model);
674
675 tmpList = selListRows;
676
677 while (tmpList)
678 {
679 int depth;
680 int *indexArray;
681 GtkTreePath *path = (GtkTreePath *) tmpList->data;
682
683 depth = gtk_tree_path_get_depth (path);
684 indexArray = gtk_tree_path_get_indices (path);
685
686 if (depth > 0)
687 {
688 //GtkTreeIter iter;
689 FCEUI_DelCheat (indexArray[0]);
690
691 //if ( gtk_tree_model_get_iter ( model, &iter, path ) )
692 //{
693 // gtk_tree_store_remove( actv_cheats_store, &iter );
694 //}
695 }
696
697 tmpList = tmpList->next;
698 }
699
700 g_list_free_full (selListRows, (GDestroyNotify) gtk_tree_path_free);
701
702 updateAllActvCheatLists (1);
703}
704
705static void updateCheatList (GtkWidget * widget, cheat_win_t * cw)
706{

Callers

nothing calls this directly

Calls 2

FCEUI_DelCheatFunction · 0.85
updateAllActvCheatListsFunction · 0.85

Tested by

no test coverage detected