mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
01962: tailg: "Fatal error: Input ports cannot be read at init time!" with -debug
This commit is contained in:
parent
fc20a0e0c3
commit
1457cfa95f
@ -151,8 +151,13 @@ static WRITE8_HANDLER( mux_select_w )
|
||||
|
||||
static UINT8 joystick_read(void)
|
||||
{
|
||||
int xval = (INT16)(cpunum_get_reg(0, CCPU_X) << 4) >> 4;
|
||||
return (input_port_read_safe(Machine, mux_select ? "ANALOGX" : "ANALOGY", 0) - xval) < 0x800;
|
||||
if (mame_get_phase(Machine) != MAME_PHASE_RUNNING)
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
int xval = (INT16)(cpunum_get_reg(0, CCPU_X) << 4) >> 4;
|
||||
return (input_port_read_safe(Machine, mux_select ? "ANALOGX" : "ANALOGY", 0) - xval) < 0x800;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user