Revert "Add 'Ignore null drivers' setting"

This reverts commit f16f3d29686e9a437abbb54976c7edc635159484.
This commit is contained in:
Hugo Hromic 2020-07-05 22:18:17 +01:00
parent b94a3928e4
commit c985dcc84d
10 changed files with 39 additions and 113 deletions

View File

@ -1489,7 +1489,6 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("core_updater_show_experimental_cores", &settings->bools.network_buildbot_show_experimental_cores, true, DEFAULT_NETWORK_BUILDBOT_SHOW_EXPERIMENTAL_CORES, false);
SETTING_BOOL("core_updater_auto_backup", &settings->bools.core_updater_auto_backup, true, DEFAULT_CORE_UPDATER_AUTO_BACKUP, false);
SETTING_BOOL("camera_allow", &settings->bools.camera_allow, true, false, false);
SETTING_BOOL("add_null_drivers", &settings->bools.add_null_drivers, true, false, false);
SETTING_BOOL("discord_allow", &settings->bools.discord_enable, true, false, false);
#if defined(VITA)
SETTING_BOOL("input_backtouch_enable", &settings->bools.input_backtouch_enable, false, false, false);

View File

@ -331,7 +331,6 @@ typedef struct settings
bool driver_switch_enable;
/* Misc. */
bool add_null_drivers;
bool discord_enable;
bool threaded_data_runloop_enable;
bool set_supports_no_game_enable;

View File

@ -3128,10 +3128,6 @@ MSG_HASH(
MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT,
"video_shared_context"
)
MSG_HASH(
MENU_ENUM_LABEL_ADD_NULL_DRIVERS,
"ignore_null_drivers"
)
MSG_HASH(
MENU_ENUM_LABEL_VIDEO_SMOOTH,
"video_smooth"

View File

@ -11202,14 +11202,7 @@ MSG_HASH(
MSG_READ_ONLY,
"Read-Only"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_ADD_NULL_DRIVERS,
"Ignore null drivers"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_ADD_NULL_DRIVERS,
"Don't allow the user to set a driver to nothing. Can prevent the user from locking him/herself out of the program."
)
#ifdef HAVE_LAKKA_SWITCH
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_GPU_PROFILE,

View File

@ -116,28 +116,6 @@ static void menu_action_setting_disp_set_label_cheat_num_passes(
}
#endif
static void menu_action_setting_disp_add_null_drivers(
file_list_t* list,
unsigned *w, unsigned type, unsigned i,
const char *label,
char *s, size_t len,
const char *path,
char *s2, size_t len2)
{
menu_file_list_cbs_t *cbs = (menu_file_list_cbs_t*)
list->list[i].actiondata;
bool val = *cbs->setting->value.target.boolean;
*s = '\0';
*w = 19;
strlcpy(s2, path, len2);
if (val)
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), len);
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), len);
}
#ifdef HAVE_CHEEVOS
static void menu_action_setting_disp_set_label_cheevos_entry(
file_list_t* list,
@ -1563,9 +1541,6 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
{
switch (cbs->enum_idx)
{
case MENU_ENUM_LABEL_ADD_NULL_DRIVERS:
BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_add_null_drivers);
break;
case MENU_ENUM_LABEL_VIDEO_DRIVER:
case MENU_ENUM_LABEL_AUDIO_DRIVER:
case MENU_ENUM_LABEL_INPUT_DRIVER:

View File

@ -338,7 +338,6 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_audio_max_timing_skew, MENU_
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_pause_nonactive, MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_disable_composition, MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_smooth, MENU_ENUM_SUBLABEL_VIDEO_SMOOTH)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_add_null_drivers, MENU_ENUM_SUBLABEL_ADD_NULL_DRIVERS)
#ifdef HAVE_ODROIDGO2
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_ctx_scaling, MENU_ENUM_SUBLABEL_VIDEO_RGA_SCALING)
#else
@ -3026,9 +3025,6 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_VIDEO_CROP_OVERSCAN:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_crop_overscan);
break;
case MENU_ENUM_LABEL_ADD_NULL_DRIVERS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_add_null_drivers);
break;
case MENU_ENUM_LABEL_VIDEO_SMOOTH:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_smooth);
break;

View File

@ -7824,7 +7824,6 @@ unsigned menu_displaylist_build_list(
{
menu_displaylist_build_info_t build_list[] = {
{MENU_ENUM_LABEL_SETTINGS_SHOW_DRIVERS, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_ADD_NULL_DRIVERS, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_SETTINGS_SHOW_VIDEO, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_SETTINGS_SHOW_AUDIO, PARSE_ONLY_BOOL},
{MENU_ENUM_LABEL_SETTINGS_SHOW_INPUT, PARSE_ONLY_BOOL},

View File

@ -14962,21 +14962,6 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.add_null_drivers,
MENU_ENUM_LABEL_ADD_NULL_DRIVERS,
MENU_ENUM_LABEL_VALUE_ADD_NULL_DRIVERS,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.settings_show_video,

View File

@ -977,7 +977,6 @@ enum msg_hash_enums
MENU_LABEL(SCREEN_ORIENTATION),
MENU_LABEL(VIDEO_SCALE),
MENU_LABEL(VIDEO_RECORD_THREADS),
MENU_LABEL(ADD_NULL_DRIVERS),
MENU_LABEL(VIDEO_SMOOTH),
MENU_LABEL(VIDEO_CTX_SCALING),
#ifdef HAVE_ODROIDGO2

View File

@ -10531,10 +10531,8 @@ struct string_list *string_list_new_special(enum string_list_type type,
unsigned i;
core_info_list_t *core_info_list = NULL;
const core_info_t *core_info = NULL;
struct rarch_state *p_rarch = &rarch_st;
settings_t *settings = p_rarch->configuration_settings;
bool add_null_entries = settings->bools.add_null_drivers;
struct string_list *s = string_list_new();
bool add_null_entries = true;
if (!s || !len)
goto error;
@ -10550,14 +10548,13 @@ struct string_list *string_list_new_special(enum string_list_type type,
{
if (menu_ctx_drivers[i])
{
bool add_null = add_null_entries;
const char *opt = menu_ctx_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
}
@ -10566,14 +10563,13 @@ struct string_list *string_list_new_special(enum string_list_type type,
case STRING_LIST_CAMERA_DRIVERS:
for (i = 0; camera_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = camera_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
@ -10596,14 +10592,13 @@ struct string_list *string_list_new_special(enum string_list_type type,
#ifdef HAVE_WIFI
for (i = 0; wifi_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = wifi_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
@ -10611,70 +10606,65 @@ struct string_list *string_list_new_special(enum string_list_type type,
case STRING_LIST_LOCATION_DRIVERS:
for (i = 0; location_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = location_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
case STRING_LIST_AUDIO_DRIVERS:
for (i = 0; audio_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = audio_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
case STRING_LIST_AUDIO_RESAMPLER_DRIVERS:
for (i = 0; audio_resampler_driver_find_handle(i); i++)
{
bool add_null = add_null_entries;
const char *opt = audio_resampler_driver_find_ident(i);
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
case STRING_LIST_VIDEO_DRIVERS:
for (i = 0; video_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = video_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
case STRING_LIST_INPUT_DRIVERS:
for (i = 0; input_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = input_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
@ -10682,14 +10672,13 @@ struct string_list *string_list_new_special(enum string_list_type type,
#ifdef HAVE_HID
for (i = 0; hid_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = hid_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
#endif
@ -10697,42 +10686,39 @@ struct string_list *string_list_new_special(enum string_list_type type,
case STRING_LIST_INPUT_JOYPAD_DRIVERS:
for (i = 0; joypad_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = joypad_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
case STRING_LIST_RECORD_DRIVERS:
for (i = 0; record_drivers[i]; i++)
{
bool add_null = add_null_entries;
const char *opt = record_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
case STRING_LIST_MIDI_DRIVERS:
for (i = 0; midi_driver_find_handle(i); i++)
{
bool add_null = add_null_entries;
const char *opt = midi_drivers[i]->ident;
*len += strlen(opt) + 1;
if (!add_null)
add_null = (i == 0) || !string_is_equal(opt, "null");
if (!add_null_entries)
add_null_entries = (i == 0) || !string_is_equal(opt, "null");
if (add_null)
if (add_null_entries)
string_list_append(s, opt, attr);
}
break;
@ -34342,8 +34328,7 @@ static void retroarch_deinit_drivers(struct rarch_state *p_rarch)
bool driver_ctl(enum driver_ctl_state state, void *data)
{
struct rarch_state *p_rarch = &rarch_st;
settings_t *settings = p_rarch->configuration_settings;
bool add_null_entries = settings->bools.add_null_drivers;
bool add_null_entries = true;
switch (state)
{