Previous 15994 Revisions Next

r7853 Sunday 18th April, 2010 at 11:08:58 UTC by Firewave
Only schedule a hard reset when the image could be loaded
[src/mess]image.c

src/mess/image.c
r7852r7853
806806    if (slot->err)
807807        goto done;
808808
809    /* do we need to reset the CPU? */
810    if ((attotime_compare(timer_get_time(machine), attotime_zero) > 0) && slot->info.reset_on_load)
811        mame_schedule_hard_reset(machine);
812
813809   /* Check if there's a software list defined for this device and use that if we're not creating an image */
814810   if ( is_create || !load_software_part( image, path, &slot->software_info_ptr, &slot->software_part_ptr, &slot->full_software_name ) )
815811   {
r7852r7853
860856done:
861857    if (slot->err)
862858        image_clear(slot);
859   else {
860      /* do we need to reset the CPU? only schedule it if load/create is successful */
861      if ((attotime_compare(timer_get_time(machine), attotime_zero) > 0) && slot->info.reset_on_load)
862         mame_schedule_hard_reset(machine);
863   }
864
863865    return slot->err ? INIT_FAIL : INIT_PASS;
864866}
865867

Previous 15994 Revisions Next


© 1998-2018 The MESS Team