mirror of https://github.com/snes9xgit/snes9x.git
Add hidden option for enabling non-modal dialogs.
This commit is contained in:
parent
ab6f76a9a3
commit
c6677d8292
|
@ -172,6 +172,7 @@ Snes9xConfig::load_defaults (void)
|
|||
netplay_last_rom [0] = '\0';
|
||||
netplay_last_host [0] = '\0';
|
||||
netplay_last_port = 6096;
|
||||
modal_dialogs = 1;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
bilinear_filter = 0;
|
||||
|
@ -307,6 +308,7 @@ Snes9xConfig::save_config_file (void)
|
|||
xml_out_int (xml, "fullscreen", fullscreen);
|
||||
xml_out_int (xml, "ui_visible", ui_visible);
|
||||
xml_out_int (xml, "statusbar_visible", statusbar_visible);
|
||||
xml_out_int (xml, "modal_dialogs", modal_dialogs);
|
||||
|
||||
xml_out_float (xml, "ntsc_hue", ntsc_setup.hue);
|
||||
xml_out_float (xml, "ntsc_saturation", ntsc_setup.saturation);
|
||||
|
@ -661,6 +663,10 @@ Snes9xConfig::set_option (const char *name, const char *value)
|
|||
{
|
||||
strncpy (export_directory, value, PATH_MAX);
|
||||
}
|
||||
else if (!strcasecmp (name, "modal_dialogs"))
|
||||
{
|
||||
modal_dialogs = atoi (value) ? 1 : 0;
|
||||
}
|
||||
else if (!strcasecmp (name, "window_width"))
|
||||
{
|
||||
window_width = atoi (value);
|
||||
|
|
|
@ -123,6 +123,7 @@ class Snes9xConfig
|
|||
int pause_emulation_on_switch;
|
||||
int num_threads;
|
||||
unsigned char screensaver_needs_reset;
|
||||
int modal_dialogs;
|
||||
|
||||
int pointer_is_visible;
|
||||
struct timeval pointer_timestamp;
|
||||
|
|
|
@ -1846,7 +1846,7 @@ Snes9xWindow::toggle_ui (void)
|
|||
void
|
||||
Snes9xWindow::pause_from_focus_change (void)
|
||||
{
|
||||
sys_pause++;
|
||||
sys_pause += config->modal_dialogs;
|
||||
|
||||
propagate_pause_state ();
|
||||
|
||||
|
@ -1856,7 +1856,8 @@ Snes9xWindow::pause_from_focus_change (void)
|
|||
void
|
||||
Snes9xWindow::unpause_from_focus_change (void)
|
||||
{
|
||||
sys_pause--;
|
||||
if (--sys_pause < 0)
|
||||
sys_pause = 0;
|
||||
propagate_pause_state ();
|
||||
|
||||
return;
|
||||
|
|
|
@ -68,8 +68,7 @@ class Snes9xWindow : public GtkBuilderWindow
|
|||
void expose (GdkEventExpose *event);
|
||||
|
||||
Snes9xConfig *config;
|
||||
unsigned char user_pause;
|
||||
unsigned char sys_pause;
|
||||
int user_pause, sys_pause;
|
||||
int last_width, last_height;
|
||||
int mouse_region_x, mouse_region_y;
|
||||
int mouse_region_width, mouse_region_height;
|
||||
|
|
Loading…
Reference in New Issue