genesis+plus+gx: fix (1 case of) broken determinism in savestates. io_regs was the only thing saved, input struct is what the client sends, and gamepad struct is constantly used but never saved.
This commit is contained in:
parent
4b91330b75
commit
ea9acdbe8d
|
@ -97,13 +97,6 @@ extern struct
|
|||
uint8 Counter;
|
||||
} activator[2];
|
||||
|
||||
extern struct
|
||||
{
|
||||
uint8 State;
|
||||
uint8 Counter;
|
||||
uint8 Timeout;
|
||||
} gamepad[MAX_DEVICES];
|
||||
|
||||
extern uint8 pad_index;
|
||||
|
||||
extern struct
|
||||
|
|
|
@ -40,13 +40,6 @@
|
|||
#include "shared.h"
|
||||
#include "gamepad.h"
|
||||
|
||||
struct
|
||||
{
|
||||
uint8 State;
|
||||
uint8 Counter;
|
||||
uint8 Timeout;
|
||||
} gamepad[MAX_DEVICES];
|
||||
|
||||
uint8 pad_index;
|
||||
|
||||
|
||||
|
|
|
@ -137,6 +137,13 @@ typedef struct
|
|||
int y_offset; /* gun vertical offset */
|
||||
} t_input;
|
||||
|
||||
struct
|
||||
{
|
||||
uint8 State;
|
||||
uint8 Counter;
|
||||
uint8 Timeout;
|
||||
} gamepad[MAX_DEVICES];
|
||||
|
||||
/* Global variables */
|
||||
extern t_input input;
|
||||
extern int old_system[2];
|
||||
|
|
|
@ -100,6 +100,7 @@ int state_load(unsigned char *state)
|
|||
|
||||
/* IO */
|
||||
load_param(io_reg, sizeof(io_reg));
|
||||
load_param(gamepad, sizeof(gamepad));
|
||||
if ((system_hw & SYSTEM_PBC) == SYSTEM_MD)
|
||||
{
|
||||
io_reg[0] = region_code | 0x20 | (config.bios & 1);
|
||||
|
@ -221,6 +222,7 @@ int state_save(unsigned char *state)
|
|||
|
||||
/* IO */
|
||||
save_param(io_reg, sizeof(io_reg));
|
||||
save_param(gamepad, sizeof(gamepad));
|
||||
|
||||
/* VDP */
|
||||
bufferptr += vdp_context_save(&state[bufferptr]);
|
||||
|
|
Loading…
Reference in New Issue