mirror of
https://github.com/libretro/RetroArch
synced 2025-02-12 00:40:26 +00:00
Silence more implicit conversions
This commit is contained in:
parent
f4dc486a77
commit
41a8661bdf
@ -832,7 +832,8 @@ int64_t rzipstream_write(rzipstream_t *stream, const void *data, int64_t len)
|
|||||||
* > i.e. minimum of space remaining in input buffer
|
* > i.e. minimum of space remaining in input buffer
|
||||||
* and remaining 'write data' size */
|
* and remaining 'write data' size */
|
||||||
cache_size = stream->in_buf_size - stream->in_buf_ptr;
|
cache_size = stream->in_buf_size - stream->in_buf_ptr;
|
||||||
cache_size = (cache_size > data_len) ? data_len : cache_size;
|
if (cache_size > data_len)
|
||||||
|
cache_size = data_len;
|
||||||
|
|
||||||
/* Copy as much data as possible into
|
/* Copy as much data as possible into
|
||||||
* the input buffer */
|
* the input buffer */
|
||||||
|
@ -3834,11 +3834,11 @@ static int xmb_menu_entry_action(
|
|||||||
static void xmb_render(void *data,
|
static void xmb_render(void *data,
|
||||||
unsigned width, unsigned height, bool is_idle)
|
unsigned width, unsigned height, bool is_idle)
|
||||||
{
|
{
|
||||||
size_t i;
|
unsigned i;
|
||||||
float scale_factor;
|
float scale_factor;
|
||||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
unsigned end = (unsigned)menu_entries_get_size();
|
size_t end = menu_entries_get_size();
|
||||||
gfx_display_t *p_disp = disp_get_ptr();
|
gfx_display_t *p_disp = disp_get_ptr();
|
||||||
gfx_animation_t *p_anim = anim_get_ptr();
|
gfx_animation_t *p_anim = anim_get_ptr();
|
||||||
|
|
||||||
@ -3883,7 +3883,7 @@ static void xmb_render(void *data,
|
|||||||
if ((pointer_x > margin_left) && (pointer_x < margin_right))
|
if ((pointer_x > margin_left) && (pointer_x < margin_right))
|
||||||
{
|
{
|
||||||
unsigned first = 0;
|
unsigned first = 0;
|
||||||
unsigned last = end;
|
unsigned last = end;
|
||||||
|
|
||||||
if (height)
|
if (height)
|
||||||
xmb_calculate_visible_range(xmb, height,
|
xmb_calculate_visible_range(xmb, height,
|
||||||
@ -3891,17 +3891,12 @@ static void xmb_render(void *data,
|
|||||||
|
|
||||||
for (i = first; i <= last; i++)
|
for (i = first; i <= last; i++)
|
||||||
{
|
{
|
||||||
float entry_size = (i == selection) ?
|
float entry_size = (i == (unsigned)selection) ?
|
||||||
xmb->icon_spacing_vertical * xmb->active_item_factor : xmb->icon_spacing_vertical;
|
xmb->icon_spacing_vertical * xmb->active_item_factor : xmb->icon_spacing_vertical;
|
||||||
float half_entry_size = entry_size * 0.5f;
|
float half_entry_size = entry_size * 0.5f;
|
||||||
float y_curr;
|
float y_curr = xmb_item_y(xmb, (int)i, selection) + xmb->margins_screen_top;
|
||||||
int y1;
|
int y1 = (int)((y_curr - half_entry_size) + 0.5f);
|
||||||
int y2;
|
int y2 = (int)((y_curr + half_entry_size) + 0.5f);
|
||||||
|
|
||||||
y_curr = xmb_item_y(xmb, (int)i, selection) + xmb->margins_screen_top;
|
|
||||||
|
|
||||||
y1 = (int)((y_curr - half_entry_size) + 0.5f);
|
|
||||||
y2 = (int)((y_curr + half_entry_size) + 0.5f);
|
|
||||||
|
|
||||||
if ((pointer_y > y1) && (pointer_y < y2))
|
if ((pointer_y > y1) && (pointer_y < y2))
|
||||||
{
|
{
|
||||||
|
11
retroarch.c
11
retroarch.c
@ -10613,9 +10613,9 @@ static void handle_translation_cb(
|
|||||||
char* raw_image_file_data = NULL;
|
char* raw_image_file_data = NULL;
|
||||||
struct scaler_ctx* scaler = NULL;
|
struct scaler_ctx* scaler = NULL;
|
||||||
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
|
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
|
||||||
size_t new_image_size = 0;
|
int new_image_size = 0;
|
||||||
#ifdef HAVE_AUDIOMIXER
|
#ifdef HAVE_AUDIOMIXER
|
||||||
size_t new_sound_size = 0;
|
int new_sound_size = 0;
|
||||||
#endif
|
#endif
|
||||||
const void* dummy_data = NULL;
|
const void* dummy_data = NULL;
|
||||||
void* raw_image_data = NULL;
|
void* raw_image_data = NULL;
|
||||||
@ -10781,7 +10781,7 @@ static void handle_translation_cb(
|
|||||||
|
|
||||||
ai_res = gfx_widgets_ai_service_overlay_load(
|
ai_res = gfx_widgets_ai_service_overlay_load(
|
||||||
&p_rarch->dispwidget_st,
|
&p_rarch->dispwidget_st,
|
||||||
raw_image_file_data, (unsigned) new_image_size,
|
raw_image_file_data, (unsigned)new_image_size,
|
||||||
image_type);
|
image_type);
|
||||||
|
|
||||||
if (!ai_res)
|
if (!ai_res)
|
||||||
@ -10851,13 +10851,14 @@ static void handle_translation_cb(
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
rpng_set_buf_ptr(rpng, raw_image_file_data, new_image_size);
|
rpng_set_buf_ptr(rpng, raw_image_file_data, (size_t)new_image_size);
|
||||||
rpng_start(rpng);
|
rpng_start(rpng);
|
||||||
while (rpng_iterate_image(rpng));
|
while (rpng_iterate_image(rpng));
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
retval = rpng_process_image(rpng, &raw_image_data_alpha, new_image_size, &image_width, &image_height);
|
retval = rpng_process_image(rpng, &raw_image_data_alpha,
|
||||||
|
(size_t)new_image_size, &image_width, &image_height);
|
||||||
} while (retval == IMAGE_PROCESS_NEXT);
|
} while (retval == IMAGE_PROCESS_NEXT);
|
||||||
|
|
||||||
/* Returned output from the png processor is an upside down RGBA
|
/* Returned output from the png processor is an upside down RGBA
|
||||||
|
Loading…
x
Reference in New Issue
Block a user