mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 09:41:15 +00:00
(MSVC) MSVC build fixes
This commit is contained in:
parent
3639011ed4
commit
64dc7daeca
@ -56,7 +56,7 @@ static size_t buf_remaining(struct socket_buffer *sbuf)
|
||||
*/
|
||||
bool netplay_init_socket_buffer(struct socket_buffer *sbuf, size_t size)
|
||||
{
|
||||
sbuf->data = malloc(size);
|
||||
sbuf->data = (unsigned char*)malloc(size);
|
||||
if (sbuf->data == NULL)
|
||||
return false;
|
||||
sbuf->bufsz = size;
|
||||
@ -71,7 +71,7 @@ bool netplay_init_socket_buffer(struct socket_buffer *sbuf, size_t size)
|
||||
*/
|
||||
bool netplay_resize_socket_buffer(struct socket_buffer *sbuf, size_t newsize)
|
||||
{
|
||||
unsigned char *newdata = malloc(newsize);
|
||||
unsigned char *newdata = (unsigned char*)malloc(newsize);
|
||||
if (newdata == NULL)
|
||||
return false;
|
||||
|
||||
|
@ -283,7 +283,7 @@ bool netplay_sync_pre_frame(netplay_t *netplay)
|
||||
{
|
||||
if (connection_num == 0)
|
||||
{
|
||||
netplay->connections = malloc(sizeof(struct netplay_connection));
|
||||
netplay->connections = (netplay_connection*)malloc(sizeof(struct netplay_connection));
|
||||
if (netplay->connections == NULL)
|
||||
{
|
||||
socket_close(new_fd);
|
||||
@ -295,7 +295,7 @@ bool netplay_sync_pre_frame(netplay_t *netplay)
|
||||
else
|
||||
{
|
||||
size_t new_connections_size = netplay->connections_size * 2;
|
||||
struct netplay_connection *new_connections =
|
||||
struct netplay_connection *new_connections = (netplay_connection*)
|
||||
realloc(netplay->connections,
|
||||
new_connections_size*sizeof(struct netplay_connection));
|
||||
if (new_connections == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user