diff --git a/cores/libretro-net-retropad/net_retropad_core.c b/cores/libretro-net-retropad/net_retropad_core.c index 7d44bf4957..bc0026488c 100644 --- a/cores/libretro-net-retropad/net_retropad_core.c +++ b/cores/libretro-net-retropad/net_retropad_core.c @@ -143,7 +143,7 @@ void NETRETROPAD_CORE_PREFIX(retro_init)(void) for (i = 0; i < ARRAY_SIZE(descriptors); i++) { desc = descriptors[i]; size = DESC_NUM_PORTS(desc) * DESC_NUM_INDICES(desc) * DESC_NUM_IDS(desc); - descriptors[i]->value = calloc(size, sizeof(uint16_t)); + descriptors[i]->value = (uint16_t*)calloc(size, sizeof(uint16_t)); } NETRETROPAD_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "Initialising sockets...\n"); diff --git a/cores/libretro-video-processor/video_processor_v4l2.c b/cores/libretro-video-processor/video_processor_v4l2.c index c6999ba841..b4cbadc37d 100644 --- a/cores/libretro-video-processor/video_processor_v4l2.c +++ b/cores/libretro-video-processor/video_processor_v4l2.c @@ -500,8 +500,8 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_run)(void) return; } - src = video_buffer[buf.index].start; - dst = conv_data; + src = (uint8_t*)video_buffer[buf.index].start; + dst = (uint16_t*)conv_data; /* RGB24 to RGB565 */ for (i = 0; i < video_format.fmt.pix.width * video_format.fmt.pix.height; i++, src += 3, dst += 1) @@ -657,12 +657,14 @@ RETRO_API bool VIDEOPROC_CORE_PREFIX(retro_load_game)(const struct retro_game_in } } - conv_data = calloc(1, video_format.fmt.pix.width * video_format.fmt.pix.height * 2); - if (conv_data == NULL) + conv_data = (uint16_t*)calloc(1, + video_format.fmt.pix.width * video_format.fmt.pix.height * 2); + if (!conv_data) { printf("Cannot allocate conversion buffer\n"); return false; } + printf("Allocated %u byte conversion buffer\n", video_format.fmt.pix.width * video_format.fmt.pix.height * 2);