mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
CXX_BUILD buildfix
This commit is contained in:
parent
8d186dab88
commit
6f605e2df5
@ -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");
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user