mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
CXX_BUILD / C89_BUILD buildfixes
This commit is contained in:
parent
dc8590a6e5
commit
643cd1923e
@ -997,7 +997,8 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
|
||||
IDXGIAdapter_GetDesc(d3d10->adapter, &desc);
|
||||
|
||||
utf16_to_char_string(desc.Description, str, sizeof(str));
|
||||
utf16_to_char_string((const uint16_t*)
|
||||
desc.Description, str, sizeof(str));
|
||||
|
||||
RARCH_LOG("[D3D10]: Using GPU: %s\n", str);
|
||||
|
||||
|
@ -1069,7 +1069,8 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
|
||||
IDXGIAdapter_GetDesc(d3d11->adapter, &desc);
|
||||
|
||||
utf16_to_char_string(desc.Description, str, sizeof(str));
|
||||
utf16_to_char_string((const uint16_t*)
|
||||
desc.Description, str, sizeof(str));
|
||||
|
||||
RARCH_LOG("[D3D11]: Using GPU: %s\n", str);
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ void video_shader_write_conf_cgp(config_file_t *conf,
|
||||
bool video_shader_is_supported(enum rarch_shader_type type)
|
||||
{
|
||||
gfx_ctx_flags_t flags;
|
||||
unsigned flag;
|
||||
enum display_flags flag = GFX_CTX_FLAGS_NONE;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
@ -1353,7 +1353,7 @@ static void ozone_draw_footer(ozone_handle_t *ozone, video_frame_info_t *video_i
|
||||
}
|
||||
|
||||
|
||||
static void ozone_set_thumbnail_content(void *data, char *s, size_t len)
|
||||
static void ozone_set_thumbnail_content(void *data, const char *s)
|
||||
{
|
||||
ozone_handle_t *ozone = (ozone_handle_t*)data;
|
||||
if (!ozone)
|
||||
@ -1403,8 +1403,10 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
|
||||
|
||||
if (ozone->selection != new_selection)
|
||||
{
|
||||
ozone->selection_old = ozone->selection;
|
||||
ozone->selection = new_selection;
|
||||
ozone_node_t *node = NULL;
|
||||
|
||||
ozone->selection_old = ozone->selection;
|
||||
ozone->selection = new_selection;
|
||||
|
||||
ozone->cursor_in_sidebar_old = ozone->cursor_in_sidebar;
|
||||
|
||||
@ -1412,7 +1414,7 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
|
||||
ozone_update_scroll(ozone, allow_animation, node);
|
||||
|
||||
/* Update thumbnail */
|
||||
ozone_node_t *node = (ozone_node_t*)
|
||||
node = (ozone_node_t*)
|
||||
file_list_get_userdata_at_offset(selection_buf, ozone->selection);
|
||||
|
||||
if (node)
|
||||
@ -1432,7 +1434,7 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
|
||||
if (ozone->is_playlist && ozone->depth == 1)
|
||||
{
|
||||
if (!string_is_empty(entry.path))
|
||||
ozone_set_thumbnail_content(ozone, entry.path, 0 /* will be ignored */);
|
||||
ozone_set_thumbnail_content(ozone, entry.path);
|
||||
if (!string_is_equal(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
@ -1451,7 +1453,7 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
|
||||
&& ozone->tabs[ozone->categories_selection_ptr] <= OZONE_SYSTEM_TAB_SETTINGS))
|
||||
{
|
||||
if (!string_is_empty(entry.path))
|
||||
ozone_set_thumbnail_content(ozone, entry.path, 0 /* will be ignored */);
|
||||
ozone_set_thumbnail_content(ozone, entry.path);
|
||||
if (!string_is_equal(thumb_ident,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
||||
{
|
||||
@ -1860,7 +1862,7 @@ static void ozone_populate_entries(void *data, const char *path, const char *lab
|
||||
menu_entry_get(&entry, 0, ozone->selection, NULL, true);
|
||||
|
||||
if (!string_is_empty(entry.path))
|
||||
ozone_set_thumbnail_content(ozone, entry.path, 0 /* will be ignored */);
|
||||
ozone_set_thumbnail_content(ozone, entry.path);
|
||||
|
||||
menu_entry_free(&entry);
|
||||
|
||||
@ -1876,7 +1878,7 @@ static void ozone_populate_entries(void *data, const char *path, const char *lab
|
||||
menu_entry_get(&entry, 0, ozone->selection, NULL, true);
|
||||
|
||||
if (!string_is_empty(entry.path))
|
||||
ozone_set_thumbnail_content(ozone, entry.path, 0 /* will be ignored */);
|
||||
ozone_set_thumbnail_content(ozone, entry.path);
|
||||
|
||||
menu_entry_free(&entry);
|
||||
|
||||
|
@ -1052,9 +1052,9 @@ static void xmb_unload_thumbnail_textures(void *data)
|
||||
video_driver_texture_unload(&xmb->left_thumbnail);
|
||||
}
|
||||
|
||||
static void xmb_set_thumbnail_content(void *data, char *s, size_t len)
|
||||
static void xmb_set_thumbnail_content(void *data, const char *s)
|
||||
{
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
if (!xmb)
|
||||
return;
|
||||
@ -1194,20 +1194,20 @@ static void xmb_selection_pointer_changed(
|
||||
(xmb_system_tab < XMB_SYSTEM_TAB_SETTINGS && depth == 4)) &&
|
||||
xmb->is_playlist)
|
||||
{
|
||||
xmb_set_thumbnail_content(xmb, "", 0 /* will be ignored */);
|
||||
xmb_set_thumbnail_content(xmb, NULL);
|
||||
update_thumbnails = true;
|
||||
}
|
||||
/* Database list updates
|
||||
* (pointless nuisance...) */
|
||||
else if (depth == 4 && xmb->is_db_manager_list)
|
||||
{
|
||||
xmb_set_thumbnail_content(xmb, "", 0 /* will be ignored */);
|
||||
xmb_set_thumbnail_content(xmb, NULL);
|
||||
update_thumbnails = true;
|
||||
}
|
||||
/* Filebrowser image updates */
|
||||
else if (entry_type == FILE_TYPE_IMAGEVIEWER || entry_type == FILE_TYPE_IMAGE)
|
||||
{
|
||||
xmb_set_thumbnail_content(xmb, "imageviewer", 0 /* will be ignored */);
|
||||
xmb_set_thumbnail_content(xmb, "imageviewer");
|
||||
update_thumbnails = true;
|
||||
}
|
||||
|
||||
@ -1416,7 +1416,7 @@ static void xmb_list_open_new(xmb_handle_t *xmb,
|
||||
|
||||
if (xmb->is_playlist || xmb->is_db_manager_list)
|
||||
{
|
||||
xmb_set_thumbnail_content(xmb, "", 0 /* will be ignored */);
|
||||
xmb_set_thumbnail_content(xmb, NULL);
|
||||
|
||||
if (menu_thumbnail_is_enabled(MENU_THUMBNAIL_RIGHT))
|
||||
xmb_update_thumbnail_path(xmb, 0 /* will be ignored */, 'R');
|
||||
@ -1746,7 +1746,7 @@ static void xmb_list_switch(xmb_handle_t *xmb)
|
||||
|
||||
if (xmb->is_playlist)
|
||||
{
|
||||
xmb_set_thumbnail_content(xmb, "", 0 /* will be ignored */);
|
||||
xmb_set_thumbnail_content(xmb, NULL);
|
||||
|
||||
if (menu_thumbnail_is_enabled(MENU_THUMBNAIL_RIGHT))
|
||||
xmb_update_thumbnail_path(xmb, 0 /* will be ignored */, 'R');
|
||||
|
@ -244,24 +244,28 @@ static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw,
|
||||
if (!loc)
|
||||
{
|
||||
const math_matrix_4x4 *mat = draw->matrix_data
|
||||
? (const math_matrix_4x4*)draw->matrix_data : menu_display_gl_core_get_default_mvp(video_info);
|
||||
? (const math_matrix_4x4*)draw->matrix_data : (const math_matrix_4x4*)menu_display_gl_core_get_default_mvp(video_info);
|
||||
if (gl->pipelines.alpha_blend_loc.flat_ubo_vertex >= 0)
|
||||
{
|
||||
glUniform4fv(gl->pipelines.alpha_blend_loc.flat_ubo_vertex,
|
||||
4, mat->data);
|
||||
}
|
||||
}
|
||||
|
||||
glEnableVertexAttribArray(0);
|
||||
glEnableVertexAttribArray(1);
|
||||
glEnableVertexAttribArray(2);
|
||||
|
||||
gl_core_bind_scratch_vbo(gl, vertex, 2 * sizeof(float) * draw->coords->vertices);
|
||||
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), (void *)(uintptr_t)0);
|
||||
gl_core_bind_scratch_vbo(gl, tex_coord, 2 * sizeof(float) * draw->coords->vertices);
|
||||
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), (void *)(uintptr_t)0);
|
||||
gl_core_bind_scratch_vbo(gl, color, 4 * sizeof(float) * draw->coords->vertices);
|
||||
glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void *)(uintptr_t)0);
|
||||
gl_core_bind_scratch_vbo(gl, vertex,
|
||||
2 * sizeof(float) * draw->coords->vertices);
|
||||
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE,
|
||||
2 * sizeof(float), (void *)(uintptr_t)0);
|
||||
gl_core_bind_scratch_vbo(gl, tex_coord,
|
||||
2 * sizeof(float) * draw->coords->vertices);
|
||||
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE,
|
||||
2 * sizeof(float), (void *)(uintptr_t)0);
|
||||
gl_core_bind_scratch_vbo(gl, color,
|
||||
4 * sizeof(float) * draw->coords->vertices);
|
||||
glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE,
|
||||
4 * sizeof(float), (void *)(uintptr_t)0);
|
||||
|
||||
if (draw->prim_type == MENU_DISPLAY_PRIM_TRIANGLESTRIP)
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, draw->coords->vertices);
|
||||
|
@ -2184,7 +2184,7 @@ void menu_driver_set_thumbnail_system(char *s, size_t len)
|
||||
void menu_driver_set_thumbnail_content(char *s, size_t len)
|
||||
{
|
||||
if (menu_driver_ctx && menu_driver_ctx->set_thumbnail_content)
|
||||
menu_driver_ctx->set_thumbnail_content(menu_userdata, s, len);
|
||||
menu_driver_ctx->set_thumbnail_content(menu_userdata, s);
|
||||
}
|
||||
|
||||
/* Teardown function for the menu driver. */
|
||||
|
@ -378,7 +378,7 @@ typedef struct menu_ctx_driver
|
||||
void (*update_thumbnail_path)(void *data, unsigned i, char pos);
|
||||
void (*update_thumbnail_image)(void *data);
|
||||
void (*set_thumbnail_system)(void *data, char* s, size_t len);
|
||||
void (*set_thumbnail_content)(void *data, char* s, size_t len);
|
||||
void (*set_thumbnail_content)(void *data, const char *s);
|
||||
int (*osk_ptr_at_pos)(void *data, int x, int y, unsigned width, unsigned height);
|
||||
void (*update_savestate_thumbnail_path)(void *data, unsigned i);
|
||||
void (*update_savestate_thumbnail_image)(void *data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user