diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 31a65a3898..b5e25a514c 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2804,11 +2804,12 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo } { + unsigned minimum; video_shader_ctx_texture_t texture_info; video_shader_driver_ctl(SHADER_CTL_GET_PREV_TEXTURES, &texture_info); - unsigned minimum = texture_info.id; + minimum = texture_info.id; gl->textures = max(minimum + 1, gl->textures); } diff --git a/gfx/drivers_context/drm_egl_ctx.c b/gfx/drivers_context/drm_egl_ctx.c index 15147a75a9..38a7ad8047 100644 --- a/gfx/drivers_context/drm_egl_ctx.c +++ b/gfx/drivers_context/drm_egl_ctx.c @@ -548,7 +548,7 @@ static bool gfx_ctx_drm_egl_set_video_mode(void *data, EGLint n; EGLint egl_attribs[16]; EGLint *egl_attribs_ptr = NULL; - const EGLint *attrib_ptr = NULL;; + const EGLint *attrib_ptr = NULL; EGLint *attr = NULL; #endif float refresh_mod; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index dca890a87e..d7fe0fc0b5 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -242,14 +242,11 @@ const char* config_get_video_driver_options(void) return char_list_new_special(STRING_LIST_VIDEO_DRIVERS, NULL); } -#ifdef HAVE_VULKAN static bool hw_render_context_is_vulkan(enum retro_hw_context_type type) { return type == RETRO_HW_CONTEXT_VULKAN; } -#endif -#if defined(HAVE_OPENGL) && defined(HAVE_FBO) static bool hw_render_context_is_gl(enum retro_hw_context_type type) { switch (type) @@ -266,7 +263,6 @@ static bool hw_render_context_is_gl(enum retro_hw_context_type type) return false; } -#endif static bool find_video_driver(void) { @@ -276,27 +272,27 @@ static bool find_video_driver(void) if (video_driver_ctl(RARCH_DISPLAY_CTL_IS_HW_CONTEXT, NULL)) { - current_video = NULL; struct retro_hw_render_callback *hwr = video_driver_callback(); + current_video = NULL; (void)hwr; -#if defined(HAVE_VULKAN) if (hwr && hw_render_context_is_vulkan(hwr->context_type)) { +#if defined(HAVE_VULKAN) RARCH_LOG("Using HW render, Vulkan driver forced.\n"); current_video = &video_vulkan; - } #endif + } -#if defined(HAVE_OPENGL) && defined(HAVE_FBO) if (hwr && hw_render_context_is_gl(hwr->context_type)) { +#if defined(HAVE_OPENGL) && defined(HAVE_FBO) RARCH_LOG("Using HW render, OpenGL driver forced.\n"); current_video = &video_gl; - } #endif + } if (current_video) return true; diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index a2347fce15..a17c61fd20 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -379,13 +379,17 @@ static void menu_action_setting_disp_set_label_input_desc( const char *path, char *s2, size_t len2) { - settings_t *settings = config_get_ptr(); - unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN; - unsigned inp_desc_user = inp_desc_index_offset / + char descriptor[PATH_MAX_LENGTH]; + const struct retro_keybind *auto_bind = NULL; + const struct retro_keybind *keybind = NULL; + settings_t *settings = config_get_ptr(); + unsigned inp_desc_index_offset = + type - MENU_SETTINGS_INPUT_DESC_BEGIN; + unsigned inp_desc_user = inp_desc_index_offset / (RARCH_FIRST_CUSTOM_BIND + 4); unsigned inp_desc_button_index_offset = inp_desc_index_offset - (inp_desc_user * (RARCH_FIRST_CUSTOM_BIND + 4)); - unsigned remap_id = 0; + unsigned remap_id = 0; if (!settings) return; @@ -393,14 +397,11 @@ static void menu_action_setting_disp_set_label_input_desc( remap_id = settings->input.remap_ids [inp_desc_user][inp_desc_button_index_offset]; - const struct retro_keybind *keybind = - (const struct retro_keybind*) + keybind = (const struct retro_keybind*) &settings->input.binds[inp_desc_user][remap_id]; - const struct retro_keybind *auto_bind = - (const struct retro_keybind*) + auto_bind = (const struct retro_keybind*) input_get_auto_bind(inp_desc_user, remap_id); - char descriptor[PATH_MAX_LENGTH]; input_config_get_bind_string(descriptor, keybind, auto_bind, sizeof(descriptor)); diff --git a/qb/config.params.sh b/qb/config.params.sh index 41baddc386..b3c0d2fc23 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -71,3 +71,4 @@ HAVE_QT=no # QT companion support HAVE_XSHM=no # XShm video driver support (disabled because it's just a dummied out stub) HAVE_CHEEVOS=yes # Disable Retro Achievements HAVE_VULKAN=auto # Enable Vulkan support +C89_VULKAN=no