RetroArch
|
#include <stdlib.h>
#include <sys/types.h>
#include "../../version.h"
#include <boolean.h>
#include <compat/strl.h>
#include <retro_assert.h>
#include <string/stdstring.h>
#include <net/net_http.h>
#include <file/file_path.h>
#include "netplay_discovery.h"
#include "netplay_private.h"
#include "../../configuration.h"
#include "../../input/input_driver.h"
#include "../../tasks/tasks_internal.h"
#include "../../file_path_special.h"
#include "../../paths.h"
#include "../../command.h"
#include "../../retroarch.h"
Variables | |
static bool | netplay_enabled = false |
static bool | netplay_is_client = false |
static netplay_t * | netplay_data = NULL |
static bool | in_netplay = false |
static bool | netplay_client_deferred = false |
static char | server_address_deferred [512] = "" |
static unsigned | server_port_deferred = 0 |
static int | reannounce = 0 |
static bool | is_mitm = false |
get_self_input_state: : pointer to netplay object
Grab our own input state and send this frame's input state (self and remote) over the network
Returns: true (1) if successful, otherwise false (0).
init_netplay : Host to connect to directly, if applicable (client only) : server address to connect to (client only) : TCP port to host on/connect to
Initializes netplay.
If netplay is already initialized, will return false (0).
Returns: true (1) if successful, otherwise false (0).
input_poll_net
Poll the network if necessary.
int16_t input_state_net | ( | unsigned | port, |
unsigned | device, | ||
unsigned | idx, | ||
unsigned | id | ||
) |
netplay_can_poll
Just a frontend for netplay->can_poll that handles netplay==NULL
bool netplay_command | ( | netplay_t * | netplay, |
struct netplay_connection * | connection, | ||
enum netplay_cmd | cmd, | ||
void * | data, | ||
size_t | sz, | ||
const char * | command_str, | ||
const char * | success_msg | ||
) |
netplay_command: : pointer to netplay object : command to send : data to send as argument : size of data : name of action : message to display upon success
Sends a single netplay command and waits for response. Only actually used for player flipping. FIXME: Should probably just be removed.
netplay_core_reset : pointer to netplay object
Indicate that the core has been reset to netplay peers
netplay_disconnect : pointer to netplay object
Disconnect netplay.
Returns: true (1) if successful. At present, cannot fail.
bool netplay_driver_ctl | ( | enum rarch_netplay_ctl_state | state, |
void * | data | ||
) |
netplay_driver_ctl
Frontend access to Netplay functionality
netplay_force_future : pointer to netplay object
Force netplay to ignore all past input, typically because we've just loaded a state or reset.
netplay_frontend_paused : pointer to netplay object : true if frontend is paused
Inform Netplay of the frontend's pause state (paused or otherwise)
void netplay_get_architecture | ( | char * | frontend_architecture, |
size_t | size | ||
) |
|
static |
netplay_is_alive: : pointer to netplay object
Checks if input port/index is controlled by netplay or not.
Returns: true (1) if alive, otherwise false (0).
void netplay_load_savestate | ( | netplay_t * | netplay, |
retro_ctx_serialize_info_t * | serial_info, | ||
bool | save | ||
) |
netplay_load_savestate : pointer to netplay object : the savestate being loaded, NULL means "load it yourself" : Whether to save the provided serial_info into the frame buffer
Inform Netplay of a savestate load and send it to the other side
netplay_poll: : pointer to netplay object
Polls network to see if we have anything new. If our network buffer is full, we simply have to block for new input data.
Returns: true (1) if successful, otherwise false (0).
netplay_post_frame: : pointer to netplay object
Post-frame for Netplay. We check if we have new input and replay from recorded input. Call this after running retro_run().
netplay_pre_frame: : pointer to netplay object
Pre-frame for Netplay. Call this before running retro_run().
Returns: true (1) if the frontend is cleared to emulate the frame, false (0) if we're stalled or paused
void netplay_send_savestate | ( | netplay_t * | netplay, |
retro_ctx_serialize_info_t * | serial_info, | ||
uint32_t | cx, | ||
struct compression_transcoder * | z | ||
) |
netplay_send_savestate : pointer to netplay object : the savestate being loaded : compression type : compression backend to use
Send a loaded savestate to those connected peers using the given compression scheme.
netplay_settings_share_mode
Get the preferred share mode
netplay_should_skip: : pointer to netplay object
If we're fast-forward replaying to resync, check if we should actually show frame.
Returns: bool (1) if we should skip this frame, otherwise false (0).
netplay_toggle_play_spectate
Toggle between play mode and spectate mode
|
static |
|
static |
|
static |