Removed option to disable GUI

This commit is contained in:
rdanbrook 2018-01-17 23:17:50 -05:00
parent 2388dc04b7
commit f7152269ac
8 changed files with 13 additions and 33 deletions

View file

@ -1,7 +1,7 @@
[Desktop Entry]
Name=Nestopia
Comment=Accurate NES Emulator
Exec=nestopia -e %f
Exec=nestopia %f
Icon=nestopia
Terminal=false
Type=Application

View file

@ -36,8 +36,8 @@ void cli_error(const char *message) {
void cli_show_usage() {
printf("Usage: nestopia [options] [FILE]\n");
printf("\nOptions:\n");
printf(" -d, --disablegui Disable GTK+ GUI\n");
printf(" -e, --enablegui Enable GTK+ GUI\n\n");
//printf(" -d, --disablegui Disable GTK+ GUI\n");
//printf(" -e, --enablegui Enable GTK+ GUI\n\n");
printf(" -f, --fullscreen Fullscreen mode\n");
printf(" -w, --window Window mode\n\n");
printf(" -l, --filter Video Filter\n");
@ -93,13 +93,13 @@ void cli_handle_command(int argc, char *argv[]) {
if (c == -1) { break; }
switch(c) {
case 'd':
/*case 'd':
conf.misc_disable_gui = true;
break;
case 'e':
conf.misc_disable_gui = false;
break;
break;*/
case 'f':
conf.video_fullscreen = true;

View file

@ -129,7 +129,7 @@ void config_file_write(const char *nstdir) {
fprintf(fp, "soft_patching=%d\n", conf.misc_soft_patching);
//fprintf(fp, "suppress_screensaver=%d\n", conf.misc_suppress_screensaver);
fprintf(fp, "genie_distortion=%d\n", conf.misc_genie_distortion);
fprintf(fp, "disable_gui=%d\n", conf.misc_disable_gui);
//fprintf(fp, "disable_gui=%d\n", conf.misc_disable_gui);
fprintf(fp, "disable_cursor=%d\n", conf.misc_disable_cursor);
fprintf(fp, "config_pause=%d\n", conf.misc_config_pause);
fprintf(fp, "last_folder=%s\n", conf.misc_last_folder);
@ -199,12 +199,9 @@ void config_set_default() {
conf.misc_soft_patching = true;
//conf.misc_suppress_screensaver = true;
conf.misc_genie_distortion = false;
conf.misc_disable_gui = false;
//conf.misc_disable_gui = false;
conf.misc_disable_cursor = false;
conf.misc_config_pause = false;
#ifdef _MINGW
conf.misc_disable_gui = true; // Disable GUI for MinGW
#endif
conf.misc_last_folder = NULL;
conf.misc_power_state = 0;
conf.misc_overclock = false;
@ -267,7 +264,7 @@ static int config_match(void* user, const char* section, const char* name, const
else if (MATCH("misc", "soft_patching")) { pconfig->misc_soft_patching = atoi(value); }
//else if (MATCH("misc", "suppress_screensaver")) { pconfig->misc_suppress_screensaver = atoi(value); }
else if (MATCH("misc", "genie_distortion")) { pconfig->misc_genie_distortion = atoi(value); }
else if (MATCH("misc", "disable_gui")) { pconfig->misc_disable_gui = atoi(value); }
//else if (MATCH("misc", "disable_gui")) { pconfig->misc_disable_gui = atoi(value); }
else if (MATCH("misc", "config_pause")) { pconfig->misc_config_pause = atoi(value); }
else if (MATCH("misc", "disable_cursor")) { pconfig->misc_disable_cursor = atoi(value); }
else if (MATCH("misc", "last_folder")) { pconfig->misc_last_folder = strdup(value); }

View file

@ -57,7 +57,6 @@ typedef struct {
bool misc_soft_patching;
//bool misc_suppress_screensaver;
bool misc_genie_distortion;
bool misc_disable_gui;
bool misc_disable_cursor;
bool misc_config_pause;
char* misc_last_folder;

View file

@ -54,22 +54,6 @@ bool gtkui_archive_handle(const char *filename, char *reqfile, size_t reqsize) {
}
// If it is an archive, handle it
else {
// Don't try to bring up a GUI selector if the GUI is disabled
if (conf.misc_disable_gui) {
// Fill the treestore with the filenames
while (archive_read_next_header(a, &entry) == ARCHIVE_OK) {
const char *currentfile = archive_entry_pathname(entry);
if (nst_archive_checkext(currentfile)) {
snprintf(reqfile, reqsize, "%s", currentfile);
break;
}
}
archive_read_data_skip(a);
// Free the archive
r = archive_read_free(a);
return true;
}
// Set up the archive window
GtkTreeIter iter;
GtkTreeModel *model;

View file

@ -253,10 +253,10 @@ void gtkui_cb_misc_genie_distortion(GtkToggleButton *togglebutton, gpointer user
conf.misc_genie_distortion = gtk_toggle_button_get_active(togglebutton);
}
void gtkui_cb_misc_disable_gui(GtkToggleButton *togglebutton, gpointer userdata) {
/*void gtkui_cb_misc_disable_gui(GtkToggleButton *togglebutton, gpointer userdata) {
// Enable or Disable the GUI
conf.misc_disable_gui = gtk_toggle_button_get_active(togglebutton);
}
}*/
void gtkui_cb_misc_disable_cursor(GtkToggleButton *togglebutton, gpointer userdata) {
// Enable or Disable the Cursor

View file

@ -35,7 +35,7 @@ void gtkui_cb_timing_vsync(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_timing_limiter(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_misc_soft_patching(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_misc_genie_distortion(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_misc_disable_gui(GtkToggleButton *togglebutton, gpointer userdata);
//void gtkui_cb_misc_disable_gui(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_misc_disable_cursor(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_misc_config_pause(GtkToggleButton *togglebutton, gpointer userdata);
void gtkui_cb_misc_overclock(GtkToggleButton *togglebutton, gpointer userdata);

View file

@ -1091,7 +1091,7 @@ GtkWidget *gtkui_config() {
G_CALLBACK(gtkui_cb_misc_genie_distortion), NULL);
// Disable GUI
GtkWidget *check_misc_disable_gui = gtk_widget_new(
/*GtkWidget *check_misc_disable_gui = gtk_widget_new(
GTK_TYPE_CHECK_BUTTON,
"label", "Disable GUI",
"halign", GTK_ALIGN_START,
@ -1102,7 +1102,7 @@ GtkWidget *gtkui_config() {
//gtk_box_pack_start(GTK_BOX(box_misc), check_misc_disable_gui, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(check_misc_disable_gui), "toggled",
G_CALLBACK(gtkui_cb_misc_disable_gui), NULL);
G_CALLBACK(gtkui_cb_misc_disable_gui), NULL);*/
// Disable Cursor
GtkWidget *check_misc_disable_cursor = gtk_widget_new(