Some C89_BUILD fixes

This commit is contained in:
twinaphex 2016-02-22 12:25:41 +01:00
parent 47b34b38d2
commit ef1feca097
5 changed files with 19 additions and 20 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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));

View File

@ -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