diff --git a/apple/iOS/menu.m b/apple/iOS/menu.m index 40cda1f1b0..c406727c7c 100644 --- a/apple/iOS/menu.m +++ b/apple/iOS/menu.m @@ -778,7 +778,7 @@ static void RunActionSheet(const char* title, const struct string_list* items, U const char* emula[] = { "General Options", "rewind_enable", "fps_show", 0 }; const char* video[] = { "Video Options", "video_scale_integer", "video_smooth", 0 }; const char* audio[] = { "Audio Options", "audio_mute", "audio_rate_control", "audio_rate_control_delta", 0 }; - const char* input[] = { "Input Options", "input_overlay_enable", "input_overlay", "input_overlay_opacity", 0 }; + const char* input[] = { "Input Options", "input_overlay", "input_overlay_opacity", 0 }; const char** groups[] = { emula, video, audio, input, 0 }; for (i = 0; groups[i]; i ++) diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index 7be87d39f8..982319f7cc 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -479,11 +479,6 @@ static void menu_common_entries_init(void *data, unsigned menu_type) break; case MENU_SETTINGS_OVERLAY_OPTIONS: file_list_clear(menu->selection_buf); - if ((current_setting = setting_data_find_setting(setting_data, "input_overlay_enable"))) - { - *current_setting->value.boolean = g_settings.input.overlay_enable; - file_list_push(menu->selection_buf, current_setting->short_description, MENU_SETTINGS_OVERLAY_ENABLE, 0); - } file_list_push(menu->selection_buf, "Overlay Preset", MENU_SETTINGS_OVERLAY_PRESET, 0); if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "input_overlay_opacity"))) { @@ -2666,14 +2661,9 @@ static int menu_common_iterate(unsigned action) if (driver.overlay) input_overlay_free(driver.overlay); - driver.overlay = NULL; - - if (g_settings.input.overlay_enable) - { - driver.overlay = input_overlay_new(g_settings.input.overlay); - if (!driver.overlay) - RARCH_ERR("Failed to load overlay.\n"); - } + driver.overlay = input_overlay_new(g_settings.input.overlay); + if (!driver.overlay) + RARCH_ERR("Failed to load overlay.\n"); menu_flush_stack_type(MENU_SETTINGS_OPTIONS); } @@ -3953,10 +3943,6 @@ static int menu_common_setting_set(unsigned setting, unsigned action) menu_common_setting_set_current_unsigned_integer(current_setting, 1, action, true, false); break; #ifdef HAVE_OVERLAY - case MENU_SETTINGS_OVERLAY_ENABLE: - if ((current_setting = setting_data_find_setting(setting_data, "input_overlay_enable"))) - menu_common_setting_set_current_boolean(current_setting, action); - break; case MENU_SETTINGS_OVERLAY_PRESET: switch (action) { @@ -5350,9 +5336,6 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size, snprintf(type_str, type_str_size, g_settings.osk.enable ? "ON" : "OFF"); break; #endif - case MENU_SETTINGS_OVERLAY_ENABLE: - snprintf(type_str, type_str_size, g_settings.input.overlay_enable ? "ON" : "OFF"); - break; case MENU_SETTINGS_FONT_ENABLE: snprintf(type_str, type_str_size, g_settings.video.font_enable ? "ON" : "OFF"); break; diff --git a/frontend/menu/backend/menu_common_backend.h b/frontend/menu/backend/menu_common_backend.h index f66aca1e7d..e75257b4b5 100644 --- a/frontend/menu/backend/menu_common_backend.h +++ b/frontend/menu/backend/menu_common_backend.h @@ -173,7 +173,6 @@ typedef enum MENU_SETTINGS_PRIVACY_CAMERA_ALLOW, MENU_SETTINGS_PRIVACY_LOCATION_ALLOW, - MENU_SETTINGS_OVERLAY_ENABLE, MENU_SETTINGS_OVERLAY_PRESET, MENU_SETTINGS_OVERLAY_OPACITY, MENU_SETTINGS_OVERLAY_SCALE, diff --git a/general.h b/general.h index f392885ced..eae0b4cb57 100644 --- a/general.h +++ b/general.h @@ -156,7 +156,6 @@ struct defaults int out_latency; float video_refresh_rate; bool video_threaded_enable; - bool input_overlay_enable; } settings; }; @@ -299,7 +298,6 @@ struct settings unsigned turbo_period; unsigned turbo_duty_cycle; - bool overlay_enable; char overlay[PATH_MAX]; float overlay_opacity; float overlay_scale; diff --git a/gfx/gl.c b/gfx/gl.c index 8321af20df..7f47c29de0 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -2751,9 +2751,6 @@ static void gl_render_overlay(void *data) if (!gl) return; - if (!g_settings.input.overlay_enable) - return; - glEnable(GL_BLEND); if (gl->overlay_full_screen) diff --git a/gx/gx_video.c b/gx/gx_video.c index eb7ec23725..b4b7e93401 100644 --- a/gx/gx_video.c +++ b/gx/gx_video.c @@ -1214,9 +1214,6 @@ static void gx_render_overlay(void *data) { gx_video_t *gx = (gx_video_t*)data; - if (!g_settings.input.overlay_enable) - return; - GX_SetCurrentMtx(GX_PNMTX1); GX_SetVtxDesc(GX_VA_POS, GX_DIRECT); GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); diff --git a/retroarch.c b/retroarch.c index c15fa3da72..24bef7a845 100644 --- a/retroarch.c +++ b/retroarch.c @@ -491,9 +491,6 @@ size_t audio_sample_batch(const int16_t *data, size_t frames) #ifdef HAVE_OVERLAY static inline void input_poll_overlay(void) { - if (!g_settings.input.overlay_enable) - return; - input_overlay_state_t old_key_state; memcpy(old_key_state.keys, driver.overlay_state.keys, sizeof(driver.overlay_state.keys)); memset(&driver.overlay_state, 0, sizeof(driver.overlay_state)); @@ -2701,7 +2698,7 @@ void rarch_check_block_hotkey(void) #ifdef HAVE_OVERLAY void rarch_check_overlay(void) { - if (!driver.overlay || !g_settings.input.overlay_enable) + if (!driver.overlay) return; static bool old_pressed; diff --git a/retroarch.cfg b/retroarch.cfg index a2bacd5ce2..13bd223996 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -249,9 +249,6 @@ #### Overlay -# Enable overlay. -# input_overlay_enable = false - # Path to input overlay # input_overlay = diff --git a/settings.c b/settings.c index 7a8baf1207..8150cc1fad 100644 --- a/settings.c +++ b/settings.c @@ -405,8 +405,6 @@ void config_set_defaults(void) g_settings.input.turbo_period = turbo_period; g_settings.input.turbo_duty_cycle = turbo_duty_cycle; - g_settings.input.overlay_enable = g_defaults.settings.input_overlay_enable; - g_settings.input.overlay_opacity = 0.7f; g_settings.input.overlay_scale = 1.0f; g_settings.input.autodetect_enable = input_autodetect_enable; @@ -1056,7 +1054,6 @@ bool config_load_file(const char *path, bool set_defaults) if (!strcmp(g_extern.overlay_dir, "default")) *g_extern.overlay_dir = '\0'; - CONFIG_GET_BOOL(input.overlay_enable, "input_overlay_enable"); CONFIG_GET_PATH(input.overlay, "input_overlay"); CONFIG_GET_FLOAT(input.overlay_opacity, "input_overlay_opacity"); CONFIG_GET_FLOAT(input.overlay_scale, "input_overlay_scale"); @@ -1436,7 +1433,6 @@ bool config_save_file(const char *path) #ifdef HAVE_OVERLAY config_set_path(conf, "overlay_directory", *g_extern.overlay_dir ? g_extern.overlay_dir : "default"); config_set_path(conf, "input_overlay", g_settings.input.overlay); - config_set_bool(conf, "input_overlay_enable", g_settings.input.overlay_enable); config_set_float(conf, "input_overlay_opacity", g_settings.input.overlay_opacity); config_set_float(conf, "input_overlay_scale", g_settings.input.overlay_scale); #endif diff --git a/settings_data.c b/settings_data.c index c3673b09f9..8124a26f77 100644 --- a/settings_data.c +++ b/settings_data.c @@ -402,20 +402,6 @@ static void general_change_handler(const void *data) else if (!strcmp(setting->name, "video_font_size")) g_settings.video.font_size = *setting->value.fraction; #ifdef HAVE_OVERLAY - else if (!strcmp(setting->name, "input_overlay_enable")) - { - g_settings.input.overlay_enable = *setting->value.boolean; - - if (driver.overlay) - input_overlay_free(driver.overlay); - driver.overlay = NULL; - if (g_settings.input.overlay_enable && *g_settings.input.overlay) - { - driver.overlay = input_overlay_new(g_settings.input.overlay); - if (!driver.overlay) - RARCH_ERR("Failed to load overlay.\n"); - } - } else if (!strcmp(setting->name, "input_overlay_opacity")) { g_settings.input.overlay_opacity = *setting->value.fraction; @@ -513,7 +499,7 @@ static void general_change_handler(const void *data) strlcpy(g_settings.input.overlay, setting->value.string, sizeof(g_settings.input.overlay)); - if (g_settings.input.overlay_enable && g_settings.input.overlay[0] != '\0') + if (g_settings.input.overlay[0] != '\0') driver.overlay = input_overlay_new(g_settings.input.overlay); } else if (!strcmp(setting->name, "input_overlay_scale")) @@ -973,7 +959,6 @@ rarch_setting_t* setting_data_get_list(void) /*******************/ START_GROUP("Overlay Options") START_SUB_GROUP("State") - CONFIG_BOOL(g_settings.input.overlay_enable, "input_overlay_enable", "Overlay Enable", default_overlay_enable, GROUP_NAME, SUBGROUP_NAME, general_change_handler) CONFIG_PATH(g_settings.input.overlay, "input_overlay", "Overlay Preset", "", GROUP_NAME, SUBGROUP_NAME, general_change_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY) WITH_VALUES("cfg") CONFIG_FLOAT(g_settings.input.overlay_opacity, "input_overlay_opacity", "Overlay Opacity", 0.7f, GROUP_NAME, SUBGROUP_NAME, general_change_handler) WITH_RANGE(0, 1) CONFIG_FLOAT(g_settings.input.overlay_scale, "input_overlay_scale", "Overlay Scale", 1.0f, GROUP_NAME, SUBGROUP_NAME, general_change_handler) WITH_RANGE(0, 2)