mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
fix griffin build.
This commit is contained in:
parent
1181b31df8
commit
06d4732dd7
@ -744,7 +744,10 @@ THREAD
|
|||||||
NETPLAY
|
NETPLAY
|
||||||
============================================================ */
|
============================================================ */
|
||||||
#ifdef HAVE_NETPLAY
|
#ifdef HAVE_NETPLAY
|
||||||
#include "../netplay.c"
|
#include "../netplay/netplay.c"
|
||||||
|
#include "../netplay/netplay_net.c"
|
||||||
|
#include "../netplay/netplay_spectate.c"
|
||||||
|
#include "../netplay/netplay_common.c"
|
||||||
#include "../libretro-common/net/net_compat.c"
|
#include "../libretro-common/net/net_compat.c"
|
||||||
#include "../libretro-common/net/net_http.c"
|
#include "../libretro-common/net/net_http.c"
|
||||||
#include "../tasks/task_http.c"
|
#include "../tasks/task_http.c"
|
||||||
|
@ -59,7 +59,7 @@ bool check_netplay_synched(netplay_t* netplay)
|
|||||||
return netplay->frame_count < (netplay->flip_frame + 2 * UDP_FRAME_PACKETS);
|
return netplay->frame_count < (netplay->flip_frame + 2 * UDP_FRAME_PACKETS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool info_cb(netplay_t* netplay, unsigned frames) {
|
static bool netplay_info_cb(netplay_t* netplay, unsigned frames) {
|
||||||
return netplay->net_cbs->info_cb(netplay, frames);
|
return netplay->net_cbs->info_cb(netplay, frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,7 +791,6 @@ netplay_t *netplay_new(const char *server, uint16_t port,
|
|||||||
bool spectate,
|
bool spectate,
|
||||||
const char *nick)
|
const char *nick)
|
||||||
{
|
{
|
||||||
unsigned i;
|
|
||||||
netplay_t *netplay = NULL;
|
netplay_t *netplay = NULL;
|
||||||
|
|
||||||
if (frames > UDP_FRAME_PACKETS)
|
if (frames > UDP_FRAME_PACKETS)
|
||||||
@ -820,7 +819,7 @@ netplay_t *netplay_new(const char *server, uint16_t port,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!info_cb(netplay, frames))
|
if(!netplay_info_cb(netplay, frames))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
return netplay;
|
return netplay;
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
#include <boolean.h>
|
#include <boolean.h>
|
||||||
|
|
||||||
#include "libretro.h"
|
#include "../libretro.h"
|
||||||
#include "libretro_version_1.h"
|
#include "../libretro_version_1.h"
|
||||||
|
|
||||||
typedef struct netplay netplay_t;
|
typedef struct netplay netplay_t;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* Pre-frame for Netplay (normal version).
|
* Pre-frame for Netplay (normal version).
|
||||||
**/
|
**/
|
||||||
static void pre_frame(netplay_t *netplay)
|
static void netplay_net_pre_frame(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
core.retro_serialize(netplay->buffer[netplay->self_ptr].state,
|
core.retro_serialize(netplay->buffer[netplay->self_ptr].state,
|
||||||
netplay->state_size);
|
netplay->state_size);
|
||||||
@ -37,7 +37,7 @@ static void pre_frame(netplay_t *netplay)
|
|||||||
* Post-frame for Netplay (normal version).
|
* Post-frame for Netplay (normal version).
|
||||||
* We check if we have new input and replay from recorded input.
|
* We check if we have new input and replay from recorded input.
|
||||||
**/
|
**/
|
||||||
static void post_frame(netplay_t *netplay)
|
static void netplay_net_post_frame(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
netplay->frame_count++;
|
netplay->frame_count++;
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ static void post_frame(netplay_t *netplay)
|
|||||||
netplay->is_replay = false;
|
netplay->is_replay = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static bool init_buffers(netplay_t *netplay)
|
static bool netplay_net_init_buffers(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ static bool init_buffers(netplay_t *netplay)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool info_cb(netplay_t* netplay, unsigned frames)
|
static bool netplay_net_info_cb(netplay_t* netplay, unsigned frames)
|
||||||
{
|
{
|
||||||
if (np_is_server(netplay))
|
if (np_is_server(netplay))
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ static bool info_cb(netplay_t* netplay, unsigned frames)
|
|||||||
|
|
||||||
netplay->buffer_size = frames + 1;
|
netplay->buffer_size = frames + 1;
|
||||||
|
|
||||||
if (!init_buffers(netplay))
|
if (!netplay_net_init_buffers(netplay))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
netplay->has_connection = true;
|
netplay->has_connection = true;
|
||||||
@ -145,9 +145,9 @@ static bool info_cb(netplay_t* netplay, unsigned frames)
|
|||||||
struct netplay_callbacks* netplay_get_cbs_net(void)
|
struct netplay_callbacks* netplay_get_cbs_net(void)
|
||||||
{
|
{
|
||||||
static struct netplay_callbacks cbs = {
|
static struct netplay_callbacks cbs = {
|
||||||
&pre_frame,
|
&netplay_net_pre_frame,
|
||||||
&post_frame,
|
&netplay_net_post_frame,
|
||||||
&info_cb
|
&netplay_net_info_cb
|
||||||
};
|
};
|
||||||
return &cbs;
|
return &cbs;
|
||||||
}
|
}
|
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* Pre-frame for Netplay (spectate mode version).
|
* Pre-frame for Netplay (spectate mode version).
|
||||||
**/
|
**/
|
||||||
static void pre_frame(netplay_t *netplay)
|
static void netplay_spectate_pre_frame(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
uint32_t *header;
|
uint32_t *header;
|
||||||
@ -121,7 +121,7 @@ static void pre_frame(netplay_t *netplay)
|
|||||||
* Post-frame for Netplay (spectate mode version).
|
* Post-frame for Netplay (spectate mode version).
|
||||||
* We check if we have new input and replay from recorded input.
|
* We check if we have new input and replay from recorded input.
|
||||||
**/
|
**/
|
||||||
static void post_frame(netplay_t *netplay)
|
static void netplay_spectate_post_frame(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ static void post_frame(netplay_t *netplay)
|
|||||||
netplay->spectate.input_ptr = 0;
|
netplay->spectate.input_ptr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool info_cb(netplay_t *netplay, unsigned frames)
|
static bool netplay_spectate_info_cb(netplay_t *netplay, unsigned frames)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
if(np_is_server(netplay))
|
if(np_is_server(netplay))
|
||||||
@ -170,9 +170,9 @@ static bool info_cb(netplay_t *netplay, unsigned frames)
|
|||||||
struct netplay_callbacks* netplay_get_cbs_spectate(void)
|
struct netplay_callbacks* netplay_get_cbs_spectate(void)
|
||||||
{
|
{
|
||||||
static struct netplay_callbacks cbs = {
|
static struct netplay_callbacks cbs = {
|
||||||
&pre_frame,
|
&netplay_spectate_pre_frame,
|
||||||
&post_frame,
|
&netplay_spectate_post_frame,
|
||||||
&info_cb
|
&netplay_spectate_info_cb
|
||||||
};
|
};
|
||||||
|
|
||||||
return &cbs;
|
return &cbs;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user