(MSVC) Build fixes

This commit is contained in:
twinaphex 2014-10-03 22:23:02 +02:00
parent be65663408
commit 65572c57dc
2 changed files with 11 additions and 7 deletions

View File

@ -1361,7 +1361,7 @@ static int16_t netplay_get_spectate_input(netplay_t *netplay, bool port,
int16_t input_state_spectate_client(unsigned port, unsigned device,
unsigned index, unsigned id)
{
return netplay_get_spectate_input(driver.netplay_data, port,
return netplay_get_spectate_input((netplay_t*)driver.netplay_data, port,
device, index, id);
}

View File

@ -2147,8 +2147,9 @@ static void check_volume(bool pressed_up, bool pressed_down)
#ifdef HAVE_NETPLAY
static void check_netplay_flip(bool pressed, bool fullscreen_toggle_pressed)
{
if (pressed)
netplay_flip_players(driver.netplay_data);
netplay_t *netplay = (netplay_t*)driver.netplay_data;
if (pressed && netplay)
netplay_flip_players(netplay);
rarch_check_fullscreen(fullscreen_toggle_pressed);
}
@ -3107,9 +3108,12 @@ void rarch_main_command(unsigned cmd)
break;
case RARCH_CMD_NETPLAY_DEINIT:
#ifdef HAVE_NETPLAY
if (driver.netplay_data)
netplay_free(driver.netplay_data);
{
netplay_t *netplay = (netplay_t*)driver.netplay_data;
if (netplay)
netplay_free(netplay);
driver.netplay_data = NULL;
}
#endif
break;
case RARCH_CMD_NETPLAY_INIT:
@ -3269,7 +3273,7 @@ bool rarch_main_iterate(void)
#ifdef HAVE_NETPLAY
if (driver.netplay_data)
netplay_pre_frame(driver.netplay_data);
netplay_pre_frame((netplay_t*)driver.netplay_data);
#endif
if (g_extern.bsv.movie)
@ -3311,7 +3315,7 @@ bool rarch_main_iterate(void)
#ifdef HAVE_NETPLAY
if (driver.netplay_data)
netplay_post_frame(driver.netplay_data);
netplay_post_frame((netplay_t*)driver.netplay_data);
#endif
#if defined(HAVE_THREADS)