From c64886cc6961e3600e8aad159d41164bc13fa3a8 Mon Sep 17 00:00:00 2001 From: Zsolt Vasvari Date: Sun, 16 Mar 2008 04:31:40 +0000 Subject: [PATCH] Fix: 01499: Various Drivers: Launching games from in-game [TAB] menu 2-3 times in a row throws access violation. My fix is a bit heavy handed. The real access violation happens in update_digital_joysticks() after the comment "read all the associated ports" and before the next comment --- src/emu/inptport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emu/inptport.c b/src/emu/inptport.c index 0b2c8a75a77..5090b0d39c4 100644 --- a/src/emu/inptport.c +++ b/src/emu/inptport.c @@ -2865,6 +2865,10 @@ 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 */