Add an option to disable the settings save dialog
This commit is contained in:
@@ -487,6 +487,7 @@ load_general(void)
|
||||
|
||||
confirm_reset = config_get_int(cat, "confirm_reset", 1);
|
||||
confirm_exit = config_get_int(cat, "confirm_exit", 1);
|
||||
confirm_save = config_get_int(cat, "confirm_save", 1);
|
||||
|
||||
#ifdef USE_LANGUAGE
|
||||
/*
|
||||
@@ -1760,6 +1761,11 @@ save_general(void)
|
||||
else
|
||||
config_delete_var(cat, "confirm_exit");
|
||||
|
||||
if (confirm_save != 1)
|
||||
config_set_int(cat, "confirm_save", confirm_save);
|
||||
else
|
||||
config_delete_var(cat, "confirm_save");
|
||||
|
||||
#ifdef USE_LANGUAGE
|
||||
if (plat_langid == 0x0409)
|
||||
config_delete_var(cat, "language");
|
||||
|
@@ -111,7 +111,8 @@ extern int network_card; /* (C) net interface num */
|
||||
extern char network_host[522]; /* (C) host network intf */
|
||||
extern int hdd_format_type; /* (C) hard disk file format */
|
||||
extern int confirm_reset, /* (C) enable reset confirmation */
|
||||
confirm_exit; /* (C) enable exit confirmation */
|
||||
confirm_exit, /* (C) enable exit confirmation */
|
||||
confirm_save; /* (C) enable save confirmation */
|
||||
#ifdef USE_DISCORD
|
||||
extern int enable_discord; /* (C) enable Discord integration */
|
||||
#endif
|
||||
|
3
src/pc.c
3
src/pc.c
@@ -141,7 +141,8 @@ int cpu_use_dynarec = 0, /* (C) cpu uses/needs Dyna */
|
||||
fpu_type = 0; /* (C) fpu type */
|
||||
int time_sync = 0; /* (C) enable time sync */
|
||||
int confirm_reset = 1, /* (C) enable reset confirmation */
|
||||
confirm_exit = 1; /* (C) enable exit confirmation */
|
||||
confirm_exit = 1, /* (C) enable exit confirmation */
|
||||
confirm_save = 1; /* (C) enable save confirmation */
|
||||
#ifdef USE_DISCORD
|
||||
int enable_discord = 0; /* (C) enable Discord integration */
|
||||
#endif
|
||||
|
@@ -531,7 +531,13 @@ settings_msgbox_reset()
|
||||
h = hwndMain;
|
||||
hwndMain = hwndParentDialog;
|
||||
|
||||
i = ui_msgbox_ex(MBX_QUESTION_OK | MBX_WARNING, (wchar_t *) IDS_2121, (wchar_t *) IDS_2122, (wchar_t *) IDS_2123, NULL, NULL);
|
||||
if (confirm_save)
|
||||
i = ui_msgbox_ex(MBX_QUESTION_OK | MBX_WARNING | MBX_DONTASK, (wchar_t *) IDS_2121, (wchar_t *) IDS_2122, (wchar_t *) IDS_2123, NULL, NULL);
|
||||
else
|
||||
i = 0;
|
||||
|
||||
if (i == 10)
|
||||
confirm_save = 0;
|
||||
|
||||
hwndMain = h;
|
||||
|
||||
|
Reference in New Issue
Block a user