From 73d5e8a41becd0cce9d386061e10a869f1b6ecb4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 9 May 2015 17:53:03 +0200 Subject: [PATCH] (PS3) Build fix and fix warnings --- gfx/drivers/gl.c | 6 +++--- gfx/video_context_driver.c | 2 +- menu/drivers/rmenu.c | 8 ++++---- menu/menu_animation.c | 2 +- menu/menu_animation.h | 2 +- menu/menu_entries_cbs_deferred_push.c | 2 +- menu/menu_navigation.c | 2 +- menu/menu_navigation.h | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 48327b28fc..2c5c2fe770 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1010,7 +1010,7 @@ static void gl_frame_fbo(gl_t *gl, uint64_t frame_count, gl_set_viewport(gl, rect->img_width, rect->img_height, true, false); gl->shader->set_params(gl, prev_rect->img_width, prev_rect->img_height, prev_rect->width, prev_rect->height, - gl->vp.width, gl->vp.height, frame_count, + gl->vp.width, gl->vp.height, (unsigned int)frame_count, tex_info, gl->prev_info, fbo_tex_info, fbo_tex_info_cnt); gl->coords.vertices = 4; @@ -1057,7 +1057,7 @@ static void gl_frame_fbo(gl_t *gl, uint64_t frame_count, gl->shader->set_params(gl, prev_rect->img_width, prev_rect->img_height, prev_rect->width, prev_rect->height, - gl->vp.width, gl->vp.height, frame_count, + gl->vp.width, gl->vp.height, (unsigned int)frame_count, tex_info, gl->prev_info, fbo_tex_info, fbo_tex_info_cnt); gl->coords.vertex = gl->vertex_ptr; @@ -1597,7 +1597,7 @@ static bool gl_frame(void *data, const void *frame, gl->shader->set_params(gl, width, height, gl->tex_w, gl->tex_h, gl->vp.width, gl->vp.height, - frame_count, + (unsigned int)frame_count, &gl->tex_info, gl->prev_info, NULL, 0); gl->coords.vertices = 4; diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 9afdb6dfea..5dd4a89b8f 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -242,7 +242,7 @@ bool gfx_ctx_check_window(void *data, bool *quit, bool *resize, return false; ctx->check_window(data, quit, resize, width, height, - frame_count); + (unsigned int)frame_count); return true; } diff --git a/menu/drivers/rmenu.c b/menu/drivers/rmenu.c index 8baa3ec64a..02a3744dcd 100644 --- a/menu/drivers/rmenu.c +++ b/menu/drivers/rmenu.c @@ -152,6 +152,7 @@ static void rmenu_render(void) menu_handle_t *menu = menu_driver_get_ptr(); global_t *global = global_get_ptr(); runloop_t *runloop = rarch_main_get_ptr(); + uint64_t frame_count = video_driver_get_frame_count(); if (!menu) return; @@ -193,7 +194,7 @@ static void rmenu_render(void) get_title(label, dir, menu_type, title, sizeof(title)); menu_animation_ticker_line(title_buf, RMENU_TERM_WIDTH, - runloop->frames.video.count / 15, title, true); + frame_count / 15, title, true); font_parms.x = POSITION_EDGE_MIN + POSITION_OFFSET; font_parms.y = POSITION_EDGE_MIN + POSITION_RENDER_OFFSET @@ -238,10 +239,9 @@ static void rmenu_render(void) selected = menu_list_entry_is_currently_selected(&entry); menu_animation_ticker_line(entry_title_buf, RMENU_TERM_WIDTH - (entry.spacing + 1 + 2), - runloop->frames.video.count / 15, entry.path, selected); + frame_count / 15, entry.path, selected); menu_animation_ticker_line(type_str_buf, entry.spacing, - runloop->frames.video.count / 15, - entry.value, selected); + frame_count / 15, entry.value, selected); snprintf(message, sizeof(message), "%c %s", selected ? '>' : ' ', entry_title_buf); diff --git a/menu/menu_animation.c b/menu/menu_animation.c index e1a2cba527..42dcc9f338 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -466,7 +466,7 @@ bool menu_animation_update(animation_t *animation, float dt) * Take the contents of @str and apply a ticker effect to it, * and write the results in @buf. **/ -void menu_animation_ticker_line(char *buf, size_t len, unsigned idx, +void menu_animation_ticker_line(char *buf, size_t len, uint64_t idx, const char *str, bool selected) { unsigned ticker_period, phase, phase_left_stop; diff --git a/menu/menu_animation.h b/menu/menu_animation.h index 39d993027d..9e8576e3ba 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -113,7 +113,7 @@ bool menu_animation_update(animation_t *animation, float dt); * Take the contents of @str and apply a ticker effect to it, * and write the results in @buf. **/ -void menu_animation_ticker_line(char *buf, size_t len, unsigned tick, +void menu_animation_ticker_line(char *buf, size_t len, uint64_t tick, const char *str, bool selected); #ifdef __cplusplus diff --git a/menu/menu_entries_cbs_deferred_push.c b/menu/menu_entries_cbs_deferred_push.c index 8e0397bdf4..0c92aca56c 100644 --- a/menu/menu_entries_cbs_deferred_push.c +++ b/menu/menu_entries_cbs_deferred_push.c @@ -283,8 +283,8 @@ static int deferred_push_system_information(void *data, void *userdata, { char tmp[PATH_MAX_LENGTH]; - const char *tmp_string; char tmp2[PATH_MAX_LENGTH]; + const char *tmp_string = NULL; const frontend_ctx_driver_t *frontend = frontend_get_ptr(); snprintf(tmp, sizeof(tmp), "Build date: %s", __DATE__); diff --git a/menu/menu_navigation.c b/menu/menu_navigation.c index cf38a04c53..19f048b60e 100644 --- a/menu/menu_navigation.c +++ b/menu/menu_navigation.c @@ -196,7 +196,7 @@ void menu_navigation_ascend_alphabet(menu_navigation_t *nav, size_t *ptr_out) menu_driver_navigation_ascend_alphabet(ptr_out); } -size_t menu_navigation_get_current_selection(void) +ssize_t menu_navigation_get_current_selection(void) { menu_navigation_t *nav = menu_navigation_get_ptr(); if (!nav) diff --git a/menu/menu_navigation.h b/menu/menu_navigation.h index 7f67d694be..a19807ce14 100644 --- a/menu/menu_navigation.h +++ b/menu/menu_navigation.h @@ -87,7 +87,7 @@ void menu_navigation_descend_alphabet(menu_navigation_t *nav, size_t *ptr_out); **/ void menu_navigation_ascend_alphabet(menu_navigation_t *nav, size_t *ptr_out); -size_t menu_navigation_get_current_selection(void); +ssize_t menu_navigation_get_current_selection(void); #ifdef __cplusplus }