trunk/src/emu/machine.c
| r18563 | r18564 | |
| 277 | 277 | // these operations must proceed in this order |
| 278 | 278 | rom_init(*this); |
| 279 | 279 | m_memory.initialize(); |
| 280 | |
| 281 | // initialize the watchdog |
| 280 | 282 | m_watchdog_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::watchdog_fired), this)); |
| 283 | if (config().m_watchdog_vblank_count != 0 && primary_screen != NULL) |
| 284 | primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this)); |
| 281 | 285 | save().save_item(NAME(m_watchdog_enabled)); |
| 282 | 286 | save().save_item(NAME(m_watchdog_counter)); |
| 283 | 287 | |
| r18563 | r18564 | |
| 842 | 846 | |
| 843 | 847 | // VBLANK-based watchdog? |
| 844 | 848 | else if (config().m_watchdog_vblank_count != 0) |
| 845 | | { |
| 846 | | // register a VBLANK callback for the primary screen |
| 847 | 849 | m_watchdog_counter = config().m_watchdog_vblank_count; |
| 848 | | if (primary_screen != NULL) |
| 849 | | primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this)); |
| 850 | | } |
| 851 | 850 | |
| 852 | 851 | // timer-based watchdog? |
| 853 | 852 | else if (config().m_watchdog_time != attotime::zero) |