Beispiel #1
0
static void callback_play_rom(GtkWidget* widget, gpointer data)
{
    GList *list = NULL, *llist = NULL;
    cache_entry* entry;
    GtkTreeIter iter;
    GtkTreeModel* model = gtk_tree_view_get_model(GTK_TREE_VIEW(g_MainWindow.romDisplay));
    GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(g_MainWindow.romDisplay));

    list = gtk_tree_selection_get_selected_rows (selection, &model);

    if(!list) /* Should never happen since the item is only active when a row is selected. */
        return;

    llist = g_list_first(list);

    gtk_tree_model_get_iter(model, &iter, (GtkTreePath*)llist->data);
    gtk_tree_model_get(model, &iter, 22, &entry, -1);

    g_list_foreach(list, (GFunc) gtk_tree_path_free, NULL);
    g_list_free(list);

    if(open_rom(entry->filename, entry->archivefile)==0)
        startEmulation();
}
Beispiel #2
0
/**
 * This method will resume Emulation that has previously been stopped
 * using pauseEmulation();
 * 
 * Return : None.
 * 
 */
void EmulationThread::resumeEmulation()
{
	QWriteLocker lock(&emulationStateQMutex);
	startEmulation();
}