mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
Silence more warnings on iOS
This commit is contained in:
parent
89715b7195
commit
216e7bcdaf
@ -187,8 +187,8 @@ static void compute_audio_buffer_statistics(void)
|
||||
avg_filled = 1.0f - (float)avg / audio_driver_buffer_size;
|
||||
deviation = (float)stddev / audio_driver_buffer_size;
|
||||
|
||||
low_water_size = audio_driver_buffer_size * 3 / 4;
|
||||
high_water_size = audio_driver_buffer_size / 4;
|
||||
low_water_size = (unsigned)(audio_driver_buffer_size * 3 / 4);
|
||||
high_water_size = (unsigned)(audio_driver_buffer_size / 4);
|
||||
|
||||
for (i = 1; i < samples; i++)
|
||||
{
|
||||
@ -555,7 +555,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples)
|
||||
dsp_data.output_frames = 0;
|
||||
|
||||
dsp_data.input = audio_driver_input_data;
|
||||
dsp_data.input_frames = samples >> 1;
|
||||
dsp_data.input_frames = (unsigned)(samples >> 1);
|
||||
|
||||
performance_counter_init(audio_dsp, "audio_dsp");
|
||||
performance_counter_start_plus(is_perfcnt_enable, audio_dsp);
|
||||
|
@ -1184,7 +1184,7 @@ static void cheevos_parse_var(cheevos_var_t *var, const char **memaddr)
|
||||
str++;
|
||||
}
|
||||
|
||||
var->value = strtol(str, &end, base);
|
||||
var->value = (unsigned)strtol(str, &end, base);
|
||||
*memaddr = end;
|
||||
|
||||
switch (var->type)
|
||||
|
@ -323,7 +323,7 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
|
||||
db_info->max_users = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_RELEASEDATE_MONTH:
|
||||
db_info->releasemonth = val->val.uint_;
|
||||
db_info->releasemonth = (unsigned)val->val.uint_;
|
||||
break;
|
||||
case DB_CURSOR_RELEASEDATE_YEAR:
|
||||
db_info->releaseyear = (unsigned)val->val.uint_;
|
||||
|
2
deps/miniupnpc/minisoap.c
vendored
2
deps/miniupnpc/minisoap.c
vendored
@ -50,7 +50,7 @@ httpWrite(int fd, const char * body, int bodysize,
|
||||
memcpy(p, headers, headerssize);
|
||||
memcpy(p+headerssize, body, bodysize);
|
||||
/*n = write(fd, p, headerssize+bodysize);*/
|
||||
n = send(fd, p, headerssize+bodysize, 0);
|
||||
n = (int)send(fd, p, headerssize+bodysize, 0);
|
||||
if(n<0) {
|
||||
PRINT_SOCKET_ERROR("send");
|
||||
}
|
||||
|
11
deps/miniupnpc/minissdpc.c
vendored
11
deps/miniupnpc/minissdpc.c
vendored
@ -295,19 +295,22 @@ receiveDevicesFromMiniSSDPD(int s, int * error)
|
||||
printf(" urlsize=%u", urlsize);
|
||||
#endif /* DEBUG */
|
||||
url = (unsigned char*)malloc(urlsize);
|
||||
if(url == NULL) {
|
||||
if(url == NULL)
|
||||
{
|
||||
if (error)
|
||||
*error = MINISSDPC_MEMORY_ERROR;
|
||||
return devlist;
|
||||
}
|
||||
READ_COPY_BUFFER(url, urlsize);
|
||||
if(n<=0) {
|
||||
if(n<=0)
|
||||
{
|
||||
if (error)
|
||||
*error = MINISSDPC_INVALID_SERVER_REPLY;
|
||||
goto free_url_and_return;
|
||||
}
|
||||
DECODELENGTH_READ(stsize, READ_BYTE_BUFFER);
|
||||
if(n<=0) {
|
||||
if(n<=0)
|
||||
{
|
||||
if (error)
|
||||
*error = MINISSDPC_INVALID_SERVER_REPLY;
|
||||
goto free_url_and_return;
|
||||
@ -768,7 +771,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
||||
break;
|
||||
}
|
||||
for(p = servinfo; p; p = p->ai_next) {
|
||||
n = sendto(sudp, bufr, n, 0, p->ai_addr, p->ai_addrlen);
|
||||
n = (int)sendto(sudp, bufr, n, 0, p->ai_addr, p->ai_addrlen);
|
||||
if (n < 0) {
|
||||
#ifdef DEBUG
|
||||
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
|
||||
|
6
deps/miniupnpc/miniupnpc.c
vendored
6
deps/miniupnpc/miniupnpc.c
vendored
@ -430,13 +430,13 @@ build_absolute_url(const char * baseurl, const char * descURL,
|
||||
&&(url[6] == '/'))
|
||||
return strdup(url);
|
||||
base = (baseurl[0] == '\0') ? descURL : baseurl;
|
||||
n = strlen(base);
|
||||
n = (int)strlen(base);
|
||||
if(n > 7) {
|
||||
p = (char*)strchr(base + 7, '/');
|
||||
if(p)
|
||||
n = p - base;
|
||||
n = (int)(p - base);
|
||||
}
|
||||
l = n + strlen(url) + 1;
|
||||
l = (int)(n + strlen(url) + 1);
|
||||
if(url[0] != '/')
|
||||
l++;
|
||||
if(scope_id != 0) {
|
||||
|
2
deps/miniupnpc/upnpcommands.c
vendored
2
deps/miniupnpc/upnpcommands.c
vendored
@ -38,7 +38,7 @@ UPNP_GetTotalBytesSent(const char * controlURL,
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
free(buffer); buffer = NULL;
|
||||
p = GetValueFromNameValueList(&pdata, "NewTotalBytesSent");
|
||||
r = my_atoui(p);
|
||||
r = (unsigned)my_atoui(p);
|
||||
ClearNameValueList(&pdata);
|
||||
return r;
|
||||
}
|
||||
|
@ -1613,7 +1613,7 @@ bool video_driver_find_driver(void)
|
||||
|
||||
driver_ctl(RARCH_DRIVER_CTL_FIND_INDEX, &drv);
|
||||
|
||||
i = drv.len;
|
||||
i = (int)drv.len;
|
||||
|
||||
if (i >= 0)
|
||||
current_video = (video_driver_t*)video_driver_find_handle(i);
|
||||
|
@ -351,7 +351,7 @@ static bool append_softfilter_plugs(rarch_softfilter_t *filt,
|
||||
struct string_list *list)
|
||||
{
|
||||
unsigned i;
|
||||
softfilter_simd_mask_t mask = cpu_features_get();
|
||||
softfilter_simd_mask_t mask = (softfilter_simd_mask_t)cpu_features_get();
|
||||
|
||||
(void)list;
|
||||
|
||||
|
@ -682,8 +682,9 @@ static void twoxbr_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
twoxbr_generic_rgb565(data, width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565, output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
(unsigned)(output),
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void twoxbr_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
@ -697,8 +698,9 @@ static void twoxbr_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
|
||||
twoxbr_generic_xrgb8888(data, width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_XRGB8888, output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void twoxbr_generic_packets(void *data,
|
||||
|
@ -299,9 +299,9 @@ static void twoxsai_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
twoxsai_generic_rgb565(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void twoxsai_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
@ -315,9 +315,9 @@ static void twoxsai_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
|
||||
twoxsai_generic_xrgb8888(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_XRGB8888,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void twoxsai_generic_packets(void *data,
|
||||
|
@ -201,9 +201,9 @@ static void blargg_ntsc_snes_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
blargg_ntsc_snes_rgb565(data, width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void blargg_ntsc_snes_generic_packets(void *data,
|
||||
|
@ -206,9 +206,9 @@ static void epx_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
epx_generic_rgb565(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,9 +204,9 @@ static void lq2x_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
lq2x_generic_rgb565(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void lq2x_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
@ -222,9 +222,9 @@ static void lq2x_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
|
||||
lq2x_generic_xrgb8888(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_XRGB8888,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void lq2x_generic_packets(void *data,
|
||||
|
@ -324,12 +324,12 @@ static void phosphor2x_generic_xrgb8888(void *data,
|
||||
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
uint32_t *scan_out;
|
||||
unsigned x;
|
||||
uint32_t *scan_out = NULL;
|
||||
const uint32_t *in_line = (const uint32_t*)(src + y * (src_stride));
|
||||
|
||||
/* output in a scanlines fashion. */
|
||||
uint32_t *out_line = (uint32_t*)(dst + y * (dst_stride) * 2);
|
||||
uint32_t *out_line = (uint32_t*)(dst + y * (dst_stride) * 2);
|
||||
|
||||
/* Bilinear stretch horizontally. */
|
||||
blit_linear_line_xrgb8888(out_line, in_line, width);
|
||||
@ -372,9 +372,9 @@ static void phosphor2x_generic_rgb565(void *data,
|
||||
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
uint16_t *scan_out;
|
||||
unsigned x;
|
||||
/* Output in a scanlines fashion. */
|
||||
uint16_t *scan_out = NULL;
|
||||
uint16_t *out_line = (uint16_t*)(dst + y * (dst_stride) * 2);
|
||||
const uint16_t *in_line = (const uint16_t*)(src + y * (src_stride));
|
||||
|
||||
@ -407,16 +407,16 @@ static void phosphor2x_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
{
|
||||
struct softfilter_thread_data *thr =
|
||||
(struct softfilter_thread_data*)thread_data;
|
||||
uint32_t *input = (uint32_t*)thr->in_data;
|
||||
uint32_t *output = (uint32_t*)thr->out_data;
|
||||
unsigned width = thr->width;
|
||||
unsigned height = thr->height;
|
||||
uint32_t *input = (uint32_t*)thr->in_data;
|
||||
uint32_t *output = (uint32_t*)thr->out_data;
|
||||
unsigned width = thr->width;
|
||||
unsigned height = thr->height;
|
||||
|
||||
phosphor2x_generic_xrgb8888(data, width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_XRGB8888,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void phosphor2x_work_cb_rgb565(void *data, void *thread_data)
|
||||
@ -430,9 +430,9 @@ static void phosphor2x_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
phosphor2x_generic_rgb565(data, width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void phosphor2x_generic_packets(void *data,
|
||||
|
@ -178,9 +178,9 @@ static void scale2x_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
|
||||
scale2x_generic_xrgb8888(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_XRGB8888,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void scale2x_work_cb_rgb565(void *data, void *thread_data)
|
||||
@ -194,9 +194,9 @@ static void scale2x_work_cb_rgb565(void *data, void *thread_data)
|
||||
|
||||
scale2x_generic_rgb565(width, height,
|
||||
thr->first, thr->last, input,
|
||||
thr->in_pitch / SOFTFILTER_BPP_RGB565,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void scale2x_generic_packets(void *data,
|
||||
|
@ -269,7 +269,10 @@ static void supertwoxsai_work_cb_rgb565(void *data, void *thread_data)
|
||||
unsigned height = thr->height;
|
||||
|
||||
supertwoxsai_generic_rgb565(width, height,
|
||||
thr->first, thr->last, input, thr->in_pitch / SOFTFILTER_BPP_RGB565, output, thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
thr->first, thr->last, input,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void supertwoxsai_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
@ -281,7 +284,10 @@ static void supertwoxsai_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
unsigned height = thr->height;
|
||||
|
||||
supertwoxsai_generic_xrgb8888(width, height,
|
||||
thr->first, thr->last, input, thr->in_pitch / SOFTFILTER_BPP_XRGB8888, output, thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
thr->first, thr->last, input,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void supertwoxsai_generic_packets(void *data,
|
||||
|
@ -272,7 +272,10 @@ static void supereagle_work_cb_rgb565(void *data, void *thread_data)
|
||||
unsigned height = thr->height;
|
||||
|
||||
supereagle_generic_rgb565(width, height,
|
||||
thr->first, thr->last, input, thr->in_pitch / SOFTFILTER_BPP_RGB565, output, thr->out_pitch / SOFTFILTER_BPP_RGB565);
|
||||
thr->first, thr->last, input,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_RGB565),
|
||||
output,
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_RGB565));
|
||||
}
|
||||
|
||||
static void supereagle_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
@ -284,7 +287,10 @@ static void supereagle_work_cb_xrgb8888(void *data, void *thread_data)
|
||||
unsigned height = thr->height;
|
||||
|
||||
supereagle_generic_xrgb8888(width, height,
|
||||
thr->first, thr->last, input, thr->in_pitch / SOFTFILTER_BPP_XRGB8888, output, thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
|
||||
thr->first, thr->last, input,
|
||||
(unsigned)(thr->in_pitch / SOFTFILTER_BPP_XRGB8888),
|
||||
output,
|
||||
(unsigned)(thr->out_pitch / SOFTFILTER_BPP_XRGB8888));
|
||||
}
|
||||
|
||||
static void supereagle_generic_packets(void *data,
|
||||
|
@ -129,7 +129,7 @@ static bool resampler_append_plugs(void **re,
|
||||
const retro_resampler_t **backend,
|
||||
double bw_ratio)
|
||||
{
|
||||
resampler_simd_mask_t mask = cpu_features_get();
|
||||
resampler_simd_mask_t mask = (resampler_simd_mask_t)cpu_features_get();
|
||||
|
||||
*re = (*backend)->init(&resampler_config, bw_ratio, mask);
|
||||
|
||||
|
@ -474,7 +474,7 @@ unsigned cpu_features_get_core_amount(void)
|
||||
long ret = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (ret <= 0)
|
||||
return (unsigned)1;
|
||||
return ret;
|
||||
return (unsigned)ret;
|
||||
#elif defined(BSD) || defined(__APPLE__)
|
||||
/* BSD */
|
||||
/* Copypasta from stackoverflow, dunno if it works. */
|
||||
|
@ -301,7 +301,7 @@ static int file_archive_parse_file_init(file_archive_transfer_t *state,
|
||||
if (!state->handle)
|
||||
return -1;
|
||||
|
||||
state->archive_size = file_archive_size(state->handle);
|
||||
state->archive_size = (int32_t)file_archive_size(state->handle);
|
||||
state->data = file_archive_data(state->handle);
|
||||
state->footer = 0;
|
||||
state->directory = 0;
|
||||
@ -509,7 +509,7 @@ int file_archive_parse_file_progress(file_archive_transfer_t *state)
|
||||
|
||||
delta = state->directory - state->data;
|
||||
|
||||
return delta * 100 / state->archive_size;
|
||||
return (int)(delta * 100 / state->archive_size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -588,7 +588,7 @@ int rbmp_process_image(rbmp_t *rbmp, void **buf_data,
|
||||
return IMAGE_PROCESS_ERROR;
|
||||
|
||||
rbmp->output_image = (uint32_t*)rbmp_load_from_memory(rbmp->buff_data,
|
||||
size, width, height, &comp, 4);
|
||||
(int)size, width, height, &comp, 4);
|
||||
*buf_data = rbmp->output_image;
|
||||
|
||||
rbmp_convert_frame(rbmp->output_image, *width, *height);
|
||||
|
@ -160,7 +160,7 @@ static void dump_content(RFILE *file, const void *frame,
|
||||
{
|
||||
/* BGR24 byte order input matches output. Can directly copy, but... need to make sure we pad it. */
|
||||
uint32_t zeros = 0;
|
||||
int pad = line_size-pitch;
|
||||
int pad = (int)(line_size-pitch);
|
||||
for (j = 0; j < height; j++, u.u8 += pitch)
|
||||
{
|
||||
filestream_write(file, u.u8, pitch);
|
||||
|
@ -2570,7 +2570,7 @@ int rjpeg_process_image(rjpeg_t *rjpeg, void **buf_data,
|
||||
if (!rjpeg)
|
||||
return IMAGE_PROCESS_ERROR;
|
||||
|
||||
img = (uint32_t*)rjpeg_load_from_memory(rjpeg->buff_data, size, width, height, &comp, 4);
|
||||
img = (uint32_t*)rjpeg_load_from_memory(rjpeg->buff_data, (int)size, width, height, &comp, 4);
|
||||
|
||||
if (!img)
|
||||
return IMAGE_PROCESS_ERROR;
|
||||
|
@ -898,11 +898,11 @@ static struct rpng_process *rpng_process_init(rpng_t *rpng, unsigned *width, uns
|
||||
process->stream_backend->set_in(
|
||||
process->stream,
|
||||
rpng->idat_buf.data,
|
||||
rpng->idat_buf.size);
|
||||
(uint32_t)rpng->idat_buf.size);
|
||||
process->stream_backend->set_out(
|
||||
process->stream,
|
||||
process->inflate_buf,
|
||||
process->inflate_buf_size);
|
||||
(uint32_t)process->inflate_buf_size);
|
||||
|
||||
return process;
|
||||
|
||||
|
@ -333,11 +333,11 @@ static bool rpng_save_image(const char *path,
|
||||
stream_backend->set_in(
|
||||
stream,
|
||||
encode_buf,
|
||||
encode_buf_size);
|
||||
(unsigned)encode_buf_size);
|
||||
stream_backend->set_out(
|
||||
stream,
|
||||
deflate_buf + 8,
|
||||
encode_buf_size * 2);
|
||||
(unsigned)(encode_buf_size * 2));
|
||||
|
||||
if (!stream_backend->trans(stream, true, &total_in, &total_out, NULL))
|
||||
{
|
||||
|
@ -195,7 +195,7 @@ static INLINE bool video_pixel_frame_scale(
|
||||
scaler->in_height = height;
|
||||
scaler->out_width = width;
|
||||
scaler->out_height = height;
|
||||
scaler->in_stride = pitch;
|
||||
scaler->in_stride = (int)pitch;
|
||||
scaler->out_stride = width * sizeof(uint16_t);
|
||||
|
||||
scaler_ctx_scale(scaler, output, data);
|
||||
|
@ -480,7 +480,7 @@ int libretrodb_create_index(libretrodb_t *db,
|
||||
goto clean;
|
||||
|
||||
key.type = RDT_STRING;
|
||||
key.val.string.len = strlen(field_name);
|
||||
key.val.string.len = (uint32_t)strlen(field_name);
|
||||
key.val.string.buff = (char *) field_name; /* We know we aren't going to change it */
|
||||
|
||||
while (libretrodb_cursor_read_item(&cur, &item) == 0)
|
||||
|
@ -525,8 +525,8 @@ static struct buffer query_parse_string(struct buffer buff,
|
||||
if (!*error)
|
||||
{
|
||||
size_t count;
|
||||
value->type = is_binstr ? RDT_BINARY : RDT_STRING;
|
||||
value->val.string.len = (buff.data + buff.offset) - str_start - 1;
|
||||
value->type = is_binstr ? RDT_BINARY : RDT_STRING;
|
||||
value->val.string.len = (uint32_t)((buff.data + buff.offset) - str_start - 1);
|
||||
|
||||
count = is_binstr ? (value->val.string.len + 1) / 2
|
||||
: (value->val.string.len + 1);
|
||||
@ -867,7 +867,7 @@ static struct buffer query_parse_table(struct buffer buff,
|
||||
if (!*error)
|
||||
{
|
||||
args[argi].a.value.type = RDT_STRING;
|
||||
args[argi].a.value.val.string.len = ident_len;
|
||||
args[argi].a.value.val.string.len = (uint32_t)ident_len;
|
||||
args[argi].a.value.val.string.buff = (char*)calloc(
|
||||
ident_len + 1,
|
||||
sizeof(char)
|
||||
|
@ -25,12 +25,12 @@
|
||||
|
||||
static int action_bind_down_generic(unsigned type, const char *label)
|
||||
{
|
||||
size_t scroll_accel = 0;
|
||||
size_t scroll_accel = 0;
|
||||
unsigned scroll_speed = 0;
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||
return -1;
|
||||
|
||||
scroll_speed = (MAX(scroll_accel, 2) - 2) / 4 + 1;
|
||||
scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 1);
|
||||
|
||||
if (menu_entries_get_size() <= 0)
|
||||
return 0;
|
||||
|
@ -124,7 +124,7 @@ static int action_left_scroll(unsigned type, const char *label,
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||
return false;
|
||||
|
||||
scroll_speed = (MAX(scroll_accel, 2) - 2) / 4 + 1;
|
||||
scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 1);
|
||||
fast_scroll_speed = 4 + 4 * scroll_speed;
|
||||
|
||||
if (selection > fast_scroll_speed)
|
||||
|
@ -1114,7 +1114,7 @@ static int generic_action_ok(const char *path,
|
||||
break;
|
||||
case ACTION_OK_LOAD_SHADER_PASS:
|
||||
{
|
||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(hack_shader_pass);
|
||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass((unsigned)hack_shader_pass);
|
||||
flush_char = msg_hash_to_str((enum msg_hash_enums)flush_id);
|
||||
strlcpy(
|
||||
shader_pass->source.path,
|
||||
|
@ -134,7 +134,7 @@ static int action_right_scroll(unsigned type, const char *label,
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||
return false;
|
||||
|
||||
scroll_speed = (MAX(scroll_accel, 2) - 2) / 4 + 1;
|
||||
scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 1);
|
||||
fast_scroll_speed = 4 + 4 * scroll_speed;
|
||||
|
||||
if (selection + fast_scroll_speed < (menu_entries_get_size()))
|
||||
|
@ -30,7 +30,7 @@ static int action_bind_up_generic(unsigned type, const char *label)
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||
return -1;
|
||||
|
||||
scroll_speed = (MAX(scroll_accel, 2) - 2) / 4 + 1;
|
||||
scroll_speed = (unsigned)((MAX(scroll_accel, 2) - 2) / 4 + 1);
|
||||
|
||||
if (menu_entries_get_size() <= 0)
|
||||
return 0;
|
||||
|
@ -323,7 +323,7 @@ static void rgui_render_messagebox(const char *message)
|
||||
{
|
||||
unsigned line_width;
|
||||
char *msg = list->elems[i].data;
|
||||
unsigned msglen = utf8len(msg);
|
||||
unsigned msglen = (unsigned)utf8len(msg);
|
||||
|
||||
if (msglen > RGUI_TERM_WIDTH(fb_width))
|
||||
{
|
||||
@ -339,7 +339,7 @@ static void rgui_render_messagebox(const char *message)
|
||||
glyphs_width = MAX(glyphs_width, msglen);
|
||||
}
|
||||
|
||||
height = FONT_HEIGHT_STRIDE * list->size + 6 + 10;
|
||||
height = (unsigned)(FONT_HEIGHT_STRIDE * list->size + 6 + 10);
|
||||
x = (fb_width - width) / 2;
|
||||
y = (fb_height - height) / 2;
|
||||
|
||||
@ -358,8 +358,8 @@ static void rgui_render_messagebox(const char *message)
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
const char *msg = list->elems[i].data;
|
||||
int offset_x = FONT_WIDTH_STRIDE * (glyphs_width - utf8len(msg)) / 2;
|
||||
int offset_y = FONT_HEIGHT_STRIDE * i;
|
||||
int offset_x = (int)(FONT_WIDTH_STRIDE * (glyphs_width - utf8len(msg)) / 2);
|
||||
int offset_y = (int)(FONT_HEIGHT_STRIDE * i);
|
||||
|
||||
blit_line(x + 8 + offset_x, y + 8 + offset_y, msg, color);
|
||||
}
|
||||
@ -385,7 +385,7 @@ static void rgui_blit_cursor(void)
|
||||
static void rgui_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
rgui->frame_count = video_info->frame_count;
|
||||
rgui->frame_count = (unsigned)video_info->frame_count;
|
||||
}
|
||||
|
||||
static void rgui_render(void *data)
|
||||
@ -447,8 +447,8 @@ static void rgui_render(void *data)
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &old_start);
|
||||
|
||||
new_val = menu_input_pointer_state(MENU_POINTER_Y_AXIS)
|
||||
/ 11 - 2 + old_start;
|
||||
new_val = (unsigned)(menu_input_pointer_state(MENU_POINTER_Y_AXIS)
|
||||
/ (11 - 2 + old_start));
|
||||
|
||||
menu_input_ctl(MENU_INPUT_CTL_POINTER_PTR, &new_val);
|
||||
|
||||
@ -474,7 +474,7 @@ static void rgui_render(void *data)
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &old_start);
|
||||
|
||||
new_mouse_ptr = mouse_y / 11 - 2 + old_start;
|
||||
new_mouse_ptr = (unsigned)(mouse_y / 11 - 2 + old_start);
|
||||
|
||||
menu_input_ctl(MENU_INPUT_CTL_MOUSE_PTR, &new_mouse_ptr);
|
||||
}
|
||||
@ -486,7 +486,7 @@ static void rgui_render(void *data)
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_START, &start);
|
||||
}
|
||||
|
||||
bottom = menu_entries_get_end() - RGUI_TERM_HEIGHT(fb_width, fb_height);
|
||||
bottom = (int)(menu_entries_get_end() - RGUI_TERM_HEIGHT(fb_width, fb_height));
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &old_start);
|
||||
|
||||
if (old_start > (unsigned)bottom)
|
||||
@ -535,8 +535,8 @@ static void rgui_render(void *data)
|
||||
strlcpy(title_buf, string_to_upper(title_buf), sizeof(title_buf));
|
||||
|
||||
blit_line(
|
||||
RGUI_TERM_START_X(fb_width) + (RGUI_TERM_WIDTH(fb_width)
|
||||
- utf8len(title_buf)) * FONT_WIDTH_STRIDE / 2,
|
||||
(int)(RGUI_TERM_START_X(fb_width) + (RGUI_TERM_WIDTH(fb_width)
|
||||
- utf8len(title_buf)) * FONT_WIDTH_STRIDE / 2),
|
||||
RGUI_TERM_START_X(fb_width),
|
||||
title_buf, TITLE_COLOR(settings));
|
||||
|
||||
|
@ -2098,7 +2098,7 @@ static void xmb_draw_items(
|
||||
|
||||
if (cat_selection_ptr > xmb->system_tab_end)
|
||||
core_node = xmb_get_userdata_from_horizontal_list(
|
||||
xmb, cat_selection_ptr - (xmb->system_tab_end + 1));
|
||||
xmb, (unsigned)(cat_selection_ptr - (xmb->system_tab_end + 1)));
|
||||
|
||||
end = file_list_get_size(list);
|
||||
|
||||
@ -2685,7 +2685,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
snprintf(msg, sizeof(msg), "%d%%", percent);
|
||||
|
||||
percent_width = font_driver_get_message_width(xmb->font, msg, utf8len(msg), 1);
|
||||
percent_width = (unsigned)font_driver_get_message_width(xmb->font, msg, (unsigned)utf8len(msg), 1);
|
||||
|
||||
xmb_draw_text(menu_disp_info, xmb, msg,
|
||||
width - xmb->margins.title.left - x_pos,
|
||||
@ -4039,7 +4039,7 @@ static int xmb_pointer_tap(void *userdata,
|
||||
if (y < header_height)
|
||||
{
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_CANCEL);
|
||||
return (unsigned)menu_entry_action(entry, (unsigned)selection, MENU_ACTION_CANCEL);
|
||||
}
|
||||
else if (ptr <= (menu_entries_get_size() - 1))
|
||||
{
|
||||
@ -4048,7 +4048,7 @@ static int xmb_pointer_tap(void *userdata,
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
if (ptr == selection && cbs && cbs->action_select)
|
||||
return menu_entry_action(entry, selection, MENU_ACTION_SELECT);
|
||||
return (unsigned)menu_entry_action(entry, (unsigned)selection, MENU_ACTION_SELECT);
|
||||
|
||||
idx = ptr;
|
||||
|
||||
|
@ -307,7 +307,7 @@ file_list_t *menu_entries_get_menu_stack_ptr(size_t idx)
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_LIST_GET, &menu_list);
|
||||
if (!menu_list)
|
||||
return NULL;
|
||||
return menu_list_get(menu_list, idx);
|
||||
return menu_list_get(menu_list, (unsigned)idx);
|
||||
}
|
||||
|
||||
file_list_t *menu_entries_get_selection_buf_ptr(size_t idx)
|
||||
|
@ -240,8 +240,9 @@ static int cb_nbio_generic(nbio_handle_t *nbio, size_t *len)
|
||||
image_transfer_set_buffer_ptr(image->handle, nbio->image_type, ptr);
|
||||
|
||||
image->size = *len;
|
||||
image->pos_increment = (*len / 2) ? (*len / 2) : 1;
|
||||
image->processing_pos_increment = (*len / 4) ? (*len / 4) : 1;
|
||||
image->pos_increment = (*len / 2) ? ((unsigned)(*len / 2)) : 1;
|
||||
image->processing_pos_increment = (*len / 4) ?
|
||||
((unsigned)(*len / 4)) : 1;
|
||||
|
||||
if (!image_transfer_start(image->handle, nbio->image_type))
|
||||
goto error;
|
||||
|
@ -52,7 +52,7 @@ static void task_overlay_image_done(struct overlay *overlay)
|
||||
overlay->pos = 0;
|
||||
/* Divide iteration steps by half of total descs if size is even,
|
||||
* otherwise default to 8 (arbitrary value for now to speed things up). */
|
||||
overlay->pos_increment = (overlay->size / 2) ? (overlay->size / 2) : 8;
|
||||
overlay->pos_increment = (overlay->size / 2) ? ((unsigned)(overlay->size / 2)) : 8;
|
||||
}
|
||||
|
||||
static void task_overlay_load_desc_image(
|
||||
|
Loading…
x
Reference in New Issue
Block a user