mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Better multisession fix. Reverted previous change (1002) and simply
initialize the digital joystick state in input_port_init().
This commit is contained in:
parent
ec550fa07b
commit
91bc82c487
@ -1065,6 +1065,9 @@ void input_port_init(running_machine *machine, const input_port_token *ipt)
|
||||
add_exit_callback(machine, input_port_exit);
|
||||
add_frame_callback(machine, input_port_frame);
|
||||
|
||||
/* reset the pointers */
|
||||
memset(&joystick_info, 0, sizeof(joystick_info));
|
||||
|
||||
/* start with the raw defaults and ask the OSD to customize them in the backup array */
|
||||
memcpy(default_ports_backup, default_ports_builtin, sizeof(default_ports_backup));
|
||||
osd_customize_inputport_list(default_ports_backup);
|
||||
@ -1264,9 +1267,6 @@ static void input_port_postload(void)
|
||||
int portnum, bitnum;
|
||||
UINT32 mask;
|
||||
|
||||
/* reset the pointers */
|
||||
memset(&joystick_info, 0, sizeof(joystick_info));
|
||||
|
||||
/* loop over the ports and identify all the analog inputs */
|
||||
portnum = -1;
|
||||
bitnum = 0;
|
||||
@ -2865,10 +2865,6 @@ static void input_port_frame(running_machine *machine)
|
||||
attotime curtime = timer_get_time();
|
||||
int portnum, bitnum;
|
||||
|
||||
/* get out if we are just initializing */
|
||||
if (mame_get_phase(machine) != MAME_PHASE_RUNNING)
|
||||
return;
|
||||
|
||||
profiler_mark(PROFILER_INPUT);
|
||||
|
||||
/* track the duration of the previous frame */
|
||||
|
Loading…
Reference in New Issue
Block a user