RetroArch
Classes | Functions
netplay_sync.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <boolean.h>
#include "netplay_private.h"
#include "../../autosave.h"
#include "../../driver.h"
#include "../../input/input_driver.h"
Include dependency graph for netplay_sync.c:

Classes

struct  vote_count
 

Functions

void netplay_update_unread_ptr (netplay_t *netplay)
 
netplay_input_state_t netplay_device_client_state (netplay_t *netplay, struct delta_frame *simframe, uint32_t device, uint32_t client)
 
static void netplay_merge_digital (netplay_t *netplay, netplay_input_state_t resstate, struct delta_frame *simframe, uint32_t device, uint32_t clients, const uint32_t *digital)
 
static void merge_analog_part (netplay_t *netplay, netplay_input_state_t resstate, struct delta_frame *simframe, uint32_t device, uint32_t clients, uint32_t word, uint8_t bit)
 
static void netplay_merge_analog (netplay_t *netplay, netplay_input_state_t resstate, struct delta_frame *simframe, uint32_t device, uint32_t clients, unsigned dtype)
 
bool netplay_resolve_input (netplay_t *netplay, size_t sim_ptr, bool resim)
 
static void netplay_handle_frame_hash (netplay_t *netplay, struct delta_frame *delta)
 
bool netplay_sync_pre_frame (netplay_t *netplay)
 
void netplay_sync_post_frame (netplay_t *netplay, bool stalled)
 

Function Documentation

◆ merge_analog_part()

static void merge_analog_part ( netplay_t netplay,
netplay_input_state_t  resstate,
struct delta_frame simframe,
uint32_t  device,
uint32_t  clients,
uint32_t  word,
uint8_t  bit 
)
static

merge_analog_part : pointer to netplay object : state being resolved : frame in which merging is being performed : device being merged : bitmap of clients being merged : word to merge : first bit to merge

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_device_client_state()

netplay_input_state_t netplay_device_client_state ( netplay_t netplay,
struct delta_frame simframe,
uint32_t  device,
uint32_t  client 
)

netplay_device_client_state : pointer to netplay object : frame in which merging is being performed : device being merged : client to find state for

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_handle_frame_hash()

static void netplay_handle_frame_hash ( netplay_t netplay,
struct delta_frame delta 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_merge_analog()

static void netplay_merge_analog ( netplay_t netplay,
netplay_input_state_t  resstate,
struct delta_frame simframe,
uint32_t  device,
uint32_t  clients,
unsigned  dtype 
)
static

netplay_merge_analog : pointer to netplay object : state being resolved : frame in which merging is being performed : device being merged : bitmap of clients being merged : device type

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_merge_digital()

static void netplay_merge_digital ( netplay_t netplay,
netplay_input_state_t  resstate,
struct delta_frame simframe,
uint32_t  device,
uint32_t  clients,
const uint32_t digital 
)
static

netplay_merge_digital : pointer to netplay object : state being resolved : frame in which merging is being performed : device being merged : bitmap of clients being merged : bitmap of digital bits

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_resolve_input()

bool netplay_resolve_input ( netplay_t netplay,
size_t  sim_ptr,
bool  resim 
)

netplay_resolve_input : pointer to netplay object : frame pointer for which to resolve input : are we resimulating, or simulating this frame for the first time?

"Simulate" input by assuming it hasn't changed since the last read input. Returns true if the resolved input changed from the last time it was resolved.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_sync_post_frame()

void netplay_sync_post_frame ( netplay_t netplay,
bool  stalled 
)

netplay_sync_post_frame : pointer to netplay object

Post-frame for Netplay synchronization. We check if we have new input and replay from recorded input.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_sync_pre_frame()

bool netplay_sync_pre_frame ( netplay_t netplay)

netplay_sync_pre_frame : pointer to netplay object

Pre-frame for Netplay synchronization.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ netplay_update_unread_ptr()

void netplay_update_unread_ptr ( netplay_t netplay)

netplay_update_unread_ptr

Update the global unread_ptr and unread_frame_count to correspond to the earliest unread frame count of any connected player

Here is the caller graph for this function: