Skip to content

Commit

Permalink
Sega Saturn support added
Browse files Browse the repository at this point in the history
  • Loading branch information
AmatCoder committed Aug 7, 2016
1 parent a6c4456 commit e2d8d03
Show file tree
Hide file tree
Showing 6 changed files with 4,439 additions and 3,533 deletions.
3 changes: 2 additions & 1 deletion src/input.c
Expand Up @@ -694,8 +694,9 @@ void on_input_clicked (GtkButton *button, guidata *gui)
case 9: set_ports(2, notebook, gui); break;
case 10: set_ports(2, notebook, gui); break;
case 11: set_ports(2, notebook, gui); break;
case 12: set_builtin(notebook, gui); break;
case 12: set_ports(2, notebook, gui); break;
case 13: set_builtin(notebook, gui); break;
case 14: set_builtin(notebook, gui); break;
default : break;
}

Expand Down
6 changes: 6 additions & 0 deletions src/mednaffe.c
Expand Up @@ -90,7 +90,13 @@ gchar* show_chooser(const gchar *message, guidata *gui)
#endif

GtkFileFilter* filter = gtk_file_filter_new();

#ifdef G_OS_WIN32
gtk_file_filter_add_pattern(filter, "mednafen.exe");
#else
gtk_file_filter_add_pattern(filter, "mednafen");
#endif

gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(exe), filter);

if (gtk_dialog_run(GTK_DIALOG(exe)) == GTK_RESPONSE_ACCEPT)
Expand Down
28 changes: 20 additions & 8 deletions src/mednaffe_glade.h
@@ -1,7 +1,7 @@
/*
* mednaffe_glade.h
*
* Copyright 2013-2015 AmatCoder
* Copyright 2013 AmatCoder
*
* This file is part of Mednaffe.
*
Expand Down Expand Up @@ -762,31 +762,40 @@ static const char *mednaffe_glade =
"<col id=\"3\">True</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Sega Saturn</col>\n"
"<col id=\"1\">-ss</col>\n"
"<col id=\"2\">10</col>\n"
"<col id=\"3\">True</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Sony PlayStation</col>\n"
"<col id=\"1\">-psx</col>\n"
"<col id=\"2\">10</col>\n"
"<col id=\"2\">11</col>\n"
"<col id=\"3\">True</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Super Nintendo Entertainment System/Super Famicom</col>\n"
"<col id=\"1\">-snes</col>\n"
"<col id=\"2\">11</col>\n"
"<col id=\"2\">12</col>\n"
"<col id=\"3\">True</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Virtual Boy</col>\n"
"<col id=\"1\">-vb</col>\n"
"<col id=\"2\">12</col>\n"
"<col id=\"2\">13</col>\n"
"<col id=\"3\">True</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">WonderSwan (Color)</col>\n"
"<col id=\"1\">-wswan</col>\n"
"<col id=\"2\">13</col>\n"
"<col id=\"2\">14</col>\n"
"<col id=\"3\">True</col>\n"
"</row>\n"
"</data>\n"
"</object>\n"
"<object class=\"GtkTreeModelFilter\" id=\"treemodelfilter1\">\n"
"<property name=\"child_model\">liststore3</property>\n"
"</object>\n"
"<object class=\"GtkListStore\" id=\"liststore4\">\n"
"<columns>\n"
"<!-- column-name sounddrivers -->\n"
Expand Down Expand Up @@ -935,9 +944,6 @@ static const char *mednaffe_glade =
"</object>\n"
"<object class=\"GtkTextBuffer\" id=\"textbufferfe\"/>\n"
"<object class=\"GtkTextBuffer\" id=\"textbufferout\"/>\n"
"<object class=\"GtkTreeModelFilter\" id=\"treemodelfilter1\">\n"
"<property name=\"child_model\">liststore3</property>\n"
"</object>\n"
"<object class=\"GtkWindow\" id=\"topwindow\">\n"
"<property name=\"can_focus\">False</property>\n"
"<property name=\"title\">Mednaffe</property>\n"
Expand Down Expand Up @@ -4372,6 +4378,9 @@ static const char *mednaffe_glade =
"<child>\n"
"<placeholder/>\n"
"</child>\n"
"<child>\n"
"<placeholder/>\n"
"</child>\n"
"</object>\n"
"</child>\n"
"</object>\n"
Expand Down Expand Up @@ -4620,6 +4629,9 @@ static const char *mednaffe_glade =
"<child>\n"
"<placeholder/>\n"
"</child>\n"
"<child>\n"
"<placeholder/>\n"
"</child>\n"
"</object>\n"
"</child>\n"
"</object>\n"
Expand Down
4 changes: 2 additions & 2 deletions src/prefs.c
Expand Up @@ -71,7 +71,7 @@ void save_systems_showed(GKeyFile *key_file, guidata *gui)
i++;
valid = gtk_tree_model_iter_next (model, &iter);
}
g_key_file_set_boolean_list(key_file, "GUI", "Show Systems", blist, 14);
g_key_file_set_boolean_list(key_file, "GUI", "Show Systems", blist, 15);
}

void save_emu_options(GKeyFile *key_file, guidata *gui)
Expand Down Expand Up @@ -209,7 +209,7 @@ void load_systems_showed(GKeyFile *key_file, guidata *gui)

gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter);
gtk_tree_model_get_iter_first(model, &iter2);
while (n_items<14)
while (n_items<15)
{
gtk_list_store_set(store, &iter, 3, showed[n_items], -1);
gtk_list_store_set(GTK_LIST_STORE(model), &iter2, 1, showed[n_items], -1);
Expand Down
13 changes: 9 additions & 4 deletions src/settings_glade.h
Expand Up @@ -377,25 +377,30 @@ static const char *settings_glade =
"<col id=\"2\">9</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Sony PlayStation</col>\n"
"<col id=\"0\">Sega Saturn</col>\n"
"<col id=\"1\">True</col>\n"
"<col id=\"2\">10</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Super Nintendo Entertainment System/Super Famicom</col>\n"
"<col id=\"0\">Sony PlayStation</col>\n"
"<col id=\"1\">True</col>\n"
"<col id=\"2\">11</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">Virtual Boy</col>\n"
"<col id=\"0\">Super Nintendo Entertainment System/Super Famicom</col>\n"
"<col id=\"1\">True</col>\n"
"<col id=\"2\">12</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">WonderSwan (Color)</col>\n"
"<col id=\"0\">Virtual Boy</col>\n"
"<col id=\"1\">True</col>\n"
"<col id=\"2\">13</col>\n"
"</row>\n"
"<row>\n"
"<col id=\"0\">WonderSwan (Color)</col>\n"
"<col id=\"1\">True</col>\n"
"<col id=\"2\">14</col>\n"
"</row>\n"
"</data>\n"
"</object>\n"
"</interface>\n"
Expand Down

0 comments on commit e2d8d03

Please sign in to comment.