mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
remove tons of unreferenced local variables
This commit is contained in:
parent
9ba42837d8
commit
6437e4b4a9
@ -115,10 +115,10 @@ static bool netplay_can_poll(netplay_t *netplay)
|
|||||||
*/
|
*/
|
||||||
static bool get_self_input_state(netplay_t *netplay)
|
static bool get_self_input_state(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
|
unsigned i;
|
||||||
struct delta_frame *ptr = &netplay->buffer[netplay->self_ptr];
|
struct delta_frame *ptr = &netplay->buffer[netplay->self_ptr];
|
||||||
netplay_input_state_t istate = NULL;
|
netplay_input_state_t istate = NULL;
|
||||||
uint32_t devices, used_devices = 0, devi, dev_type, local_device;
|
uint32_t devices, used_devices = 0, devi, dev_type, local_device;
|
||||||
size_t i;
|
|
||||||
|
|
||||||
if (!netplay_delta_frame_ready(netplay, ptr, netplay->self_frame_count))
|
if (!netplay_delta_frame_ready(netplay, ptr, netplay->self_frame_count))
|
||||||
return false;
|
return false;
|
||||||
@ -192,7 +192,7 @@ static bool get_self_input_state(netplay_t *netplay)
|
|||||||
int16_t tmp_y = cb(local_device, dtype, 0, 1);
|
int16_t tmp_y = cb(local_device, dtype, 0, 1);
|
||||||
state[1] = (uint16_t)tmp_x | (((uint16_t)tmp_y) << 16);
|
state[1] = (uint16_t)tmp_x | (((uint16_t)tmp_y) << 16);
|
||||||
for (i = 2;
|
for (i = 2;
|
||||||
i <= ((dtype == RETRO_DEVICE_MOUSE) ?
|
i <= (unsigned)((dtype == RETRO_DEVICE_MOUSE) ?
|
||||||
RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN :
|
RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN :
|
||||||
RETRO_DEVICE_ID_LIGHTGUN_START);
|
RETRO_DEVICE_ID_LIGHTGUN_START);
|
||||||
i++)
|
i++)
|
||||||
@ -1246,7 +1246,6 @@ uint8_t netplay_settings_share_mode(void)
|
|||||||
*/
|
*/
|
||||||
static void netplay_toggle_play_spectate(netplay_t *netplay)
|
static void netplay_toggle_play_spectate(netplay_t *netplay)
|
||||||
{
|
{
|
||||||
size_t i;
|
|
||||||
enum rarch_netplay_connection_mode mode;
|
enum rarch_netplay_connection_mode mode;
|
||||||
|
|
||||||
if (netplay->self_mode == NETPLAY_CONNECTION_PLAYING ||
|
if (netplay->self_mode == NETPLAY_CONNECTION_PLAYING ||
|
||||||
|
@ -938,7 +938,7 @@ bool netplay_handshake_pre_sync(netplay_t *netplay,
|
|||||||
struct netplay_connection *connection, bool *had_input)
|
struct netplay_connection *connection, bool *had_input)
|
||||||
{
|
{
|
||||||
uint32_t cmd[2];
|
uint32_t cmd[2];
|
||||||
uint32_t new_frame_count, client_num, flip_frame;
|
uint32_t new_frame_count, client_num;
|
||||||
uint32_t device;
|
uint32_t device;
|
||||||
uint32_t local_sram_size, remote_sram_size;
|
uint32_t local_sram_size, remote_sram_size;
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
|
@ -289,10 +289,8 @@ static bool send_input_frame(netplay_t *netplay, struct delta_frame *dframe,
|
|||||||
bool netplay_send_cur_input(netplay_t *netplay,
|
bool netplay_send_cur_input(netplay_t *netplay,
|
||||||
struct netplay_connection *connection)
|
struct netplay_connection *connection)
|
||||||
{
|
{
|
||||||
struct delta_frame *dframe = &netplay->buffer[netplay->self_ptr];
|
|
||||||
uint32_t from_client, to_client;
|
uint32_t from_client, to_client;
|
||||||
size_t i;
|
struct delta_frame *dframe = &netplay->buffer[netplay->self_ptr];
|
||||||
netplay_input_state_t istate;
|
|
||||||
|
|
||||||
if (netplay->is_server)
|
if (netplay->is_server)
|
||||||
{
|
{
|
||||||
@ -910,10 +908,8 @@ static bool netplay_get_cmd(netplay_t *netplay,
|
|||||||
struct netplay_connection *connection, bool *had_input)
|
struct netplay_connection *connection, bool *had_input)
|
||||||
{
|
{
|
||||||
uint32_t cmd;
|
uint32_t cmd;
|
||||||
uint32_t flip_frame;
|
|
||||||
uint32_t cmd_size;
|
uint32_t cmd_size;
|
||||||
ssize_t recvd;
|
ssize_t recvd;
|
||||||
char msg[512];
|
|
||||||
|
|
||||||
/* We don't handle the initial handshake here */
|
/* We don't handle the initial handshake here */
|
||||||
if (connection->mode < NETPLAY_CONNECTION_CONNECTED)
|
if (connection->mode < NETPLAY_CONNECTION_CONNECTED)
|
||||||
@ -949,7 +945,6 @@ static bool netplay_get_cmd(netplay_t *netplay,
|
|||||||
case NETPLAY_CMD_INPUT:
|
case NETPLAY_CMD_INPUT:
|
||||||
{
|
{
|
||||||
uint32_t frame_num, client_num, input_size, devices, device;
|
uint32_t frame_num, client_num, input_size, devices, device;
|
||||||
unsigned i;
|
|
||||||
struct delta_frame *dframe;
|
struct delta_frame *dframe;
|
||||||
|
|
||||||
if (cmd_size < 2*sizeof(uint32_t))
|
if (cmd_size < 2*sizeof(uint32_t))
|
||||||
@ -1324,7 +1319,6 @@ static bool netplay_get_cmd(netplay_t *netplay,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32_t frame_count;
|
uint32_t frame_count;
|
||||||
netplay_input_state_t istate;
|
|
||||||
|
|
||||||
/* It wants future frames, make sure we don't capture or send intermediate ones */
|
/* It wants future frames, make sure we don't capture or send intermediate ones */
|
||||||
START(netplay->self_ptr);
|
START(netplay->self_ptr);
|
||||||
|
@ -228,9 +228,9 @@ static void merge_analog_part(netplay_t *netplay,
|
|||||||
uint32_t device, uint32_t clients, uint32_t word, uint8_t bit)
|
uint32_t device, uint32_t clients, uint32_t word, uint8_t bit)
|
||||||
{
|
{
|
||||||
netplay_input_state_t simstate;
|
netplay_input_state_t simstate;
|
||||||
uint32_t client, client_count = 0;;
|
uint32_t client, client_count = 0;
|
||||||
uint8_t share_mode = netplay->device_share_modes[device] & NETPLAY_SHARE_ANALOG_BITS;
|
uint8_t share_mode = netplay->device_share_modes[device] & NETPLAY_SHARE_ANALOG_BITS;
|
||||||
int32_t value = 0, new_value;
|
int32_t value = 0, new_value;
|
||||||
|
|
||||||
/* Make sure all real clients are accounted for */
|
/* Make sure all real clients are accounted for */
|
||||||
for (simstate = simframe->real_input[device]; simstate; simstate = simstate->next)
|
for (simstate = simframe->real_input[device]; simstate; simstate = simstate->next)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user