diff --git a/general.h b/general.h index 78cf0e23ed..677de29331 100644 --- a/general.h +++ b/general.h @@ -225,7 +225,7 @@ struct settings struct { char driver[32]; - char gl_context[32]; + char context_driver[32]; float scale; bool fullscreen; bool windowed_fullscreen; diff --git a/gfx/gl.c b/gfx/gl.c index 6be3c6a18d..28c0a67397 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -2017,16 +2017,16 @@ static const gfx_ctx_driver_t *gl_get_context(gl_t *gl) gl->shared_context_use = g_settings.video.shared_context && cb->context_type != RETRO_HW_CONTEXT_NONE; - if (*g_settings.video.gl_context) + if (*g_settings.video.context_driver) { const gfx_ctx_driver_t *ctx = gfx_ctx_find_driver( - g_settings.video.gl_context); + g_settings.video.context_driver); if (ctx) { if (!ctx->bind_api(gl, api, major, minor)) { - RARCH_ERR("Failed to bind API %s to context %s.\n", api_name, g_settings.video.gl_context); + RARCH_ERR("Failed to bind API %s to context %s.\n", api_name, g_settings.video.context_driver); return NULL; } @@ -2042,7 +2042,7 @@ static const gfx_ctx_driver_t *gl_get_context(gl_t *gl) } else { - RARCH_ERR("Didn't find GL context: %s.\n", g_settings.video.gl_context); + RARCH_ERR("Didn't find GL context: %s.\n", g_settings.video.context_driver); return NULL; } diff --git a/settings.c b/settings.c index e83d6c62c6..3beff9632d 100644 --- a/settings.c +++ b/settings.c @@ -1021,7 +1021,7 @@ static bool config_load_file(const char *path, bool set_defaults) #ifdef HAVE_MENU CONFIG_GET_STRING(menu.driver, "menu_driver"); #endif - CONFIG_GET_STRING(video.gl_context, "video_context_driver"); + CONFIG_GET_STRING(video.context_driver, "video_context_driver"); CONFIG_GET_STRING(audio.driver, "audio_driver"); CONFIG_GET_PATH(video.softfilter_plugin, "video_filter"); CONFIG_GET_PATH(audio.dsp_plugin, "audio_dsp_plugin"); @@ -1597,6 +1597,7 @@ bool config_save_file(const char *path) config_set_float(conf, "audio_rate_control_delta", g_settings.audio.rate_control_delta); config_set_float(conf, "audio_volume", g_settings.audio.volume); + config_set_string(conf, "video_context_driver", g_settings.video.context_driver); config_set_string(conf, "audio_driver", g_settings.audio.driver); config_set_bool(conf, "audio_enable", g_settings.audio.enable); config_set_int(conf, "audio_out_rate", g_settings.audio.out_rate); diff --git a/settings_data.c b/settings_data.c index e2596f5f43..80f9721d47 100644 --- a/settings_data.c +++ b/settings_data.c @@ -3160,9 +3160,8 @@ static bool setting_data_append_list_driver_options( NULL); settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER); -#ifdef HAVE_OPENGL CONFIG_STRING( - g_settings.video.gl_context, + g_settings.video.context_driver, "video_context_driver", "Video Context Driver", "", @@ -3171,7 +3170,6 @@ static bool setting_data_append_list_driver_options( NULL, NULL); settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER); -#endif CONFIG_STRING( g_settings.audio.driver, "audio_driver",