Restructure settings struct
This commit is contained in:
parent
d257ec51a0
commit
ae1c26cbc4
|
@ -1003,6 +1003,9 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
|
||||||
static void config_set_defaults(void)
|
static void config_set_defaults(void)
|
||||||
{
|
{
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
static bool first_initialized = true;
|
||||||
|
#endif
|
||||||
int float_settings_size = 0;
|
int float_settings_size = 0;
|
||||||
int bool_settings_size = 0;
|
int bool_settings_size = 0;
|
||||||
int int_settings_size = 0;
|
int int_settings_size = 0;
|
||||||
|
@ -1022,9 +1025,6 @@ static void config_set_defaults(void)
|
||||||
struct config_bool_setting *bool_settings = NULL;
|
struct config_bool_setting *bool_settings = NULL;
|
||||||
struct config_float_setting *float_settings = NULL;
|
struct config_float_setting *float_settings = NULL;
|
||||||
struct config_int_setting *int_settings = NULL;
|
struct config_int_setting *int_settings = NULL;
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static bool first_initialized = true;
|
|
||||||
#endif
|
|
||||||
float_settings = populate_settings_float (settings, &float_settings_size);
|
float_settings = populate_settings_float (settings, &float_settings_size);
|
||||||
bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
bool_settings = populate_settings_bool (settings, &bool_settings_size);
|
||||||
int_settings = populate_settings_int (settings, &int_settings_size);
|
int_settings = populate_settings_int (settings, &int_settings_size);
|
||||||
|
|
|
@ -42,6 +42,12 @@ RETRO_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct settings
|
typedef struct settings
|
||||||
{
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
bool placeholder;
|
||||||
|
bool bundle_finished;
|
||||||
|
} bools;
|
||||||
|
|
||||||
bool modified;
|
bool modified;
|
||||||
|
|
||||||
video_viewport_t video_viewport_custom;
|
video_viewport_t video_viewport_custom;
|
||||||
|
@ -49,7 +55,6 @@ typedef struct settings
|
||||||
char playlist_names[PATH_MAX_LENGTH];
|
char playlist_names[PATH_MAX_LENGTH];
|
||||||
char playlist_cores[PATH_MAX_LENGTH];
|
char playlist_cores[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
bool bundle_finished;
|
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@ static void bundle_decompressed(void *task_data,
|
||||||
settings->bundle_assets_extract_last_version =
|
settings->bundle_assets_extract_last_version =
|
||||||
settings->bundle_assets_extract_version_current;
|
settings->bundle_assets_extract_version_current;
|
||||||
|
|
||||||
configuration_set_bool(settings, settings->bundle_finished, true);
|
configuration_set_bool(settings, settings->bools.bundle_finished, true);
|
||||||
|
|
||||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,9 +208,9 @@ int menu_dialog_iterate(char *s, size_t len, const char *label)
|
||||||
menu_hash_get_help_enum(MENU_ENUM_LABEL_VALUE_EXTRACTING_PLEASE_WAIT,
|
menu_hash_get_help_enum(MENU_ENUM_LABEL_VALUE_EXTRACTING_PLEASE_WAIT,
|
||||||
s, len);
|
s, len);
|
||||||
|
|
||||||
if (settings->bundle_finished)
|
if (settings->bools.bundle_finished)
|
||||||
{
|
{
|
||||||
settings->bundle_finished = false;
|
settings->bools.bundle_finished = false;
|
||||||
do_exit = true;
|
do_exit = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue