void debugger_init(running_machine &machine) { /* only if debugging is enabled */ if (machine.debug_flags & DEBUG_FLAG_ENABLED) { machine_entry *entry; /* initialize the submodules */ machine.m_debug_view.reset(global_alloc(debug_view_manager(machine))); debug_cpu_init(machine); debug_command_init(machine); debug_console_init(machine); /* allocate a new entry for our global list */ machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debugger_exit), &machine)); entry = global_alloc(machine_entry); entry->next = machine_list; entry->machine = &machine; machine_list = entry; /* register an atexit handler if we haven't yet */ if (!atexit_registered) atexit(debugger_flush_all_traces_on_abnormal_exit); atexit_registered = TRUE; /* listen in on the errorlog */ machine.add_logerror_callback(debug_errorlog_write_line); /* initialize osd debugger features */ machine.osd().init_debugger(); } }
void winvideo_init(running_machine &machine) { int index; // ensure we get called on the way out machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(winvideo_exit), &machine)); // extract data from the options extract_video_config(machine); // set up monitors first init_monitors(); // initialize the window system so we can make windows winwindow_init(machine); // create the windows windows_options &options = downcast<windows_options &>(machine.options()); for (index = 0; index < video_config.numscreens; index++) winwindow_video_window_create(machine, index, pick_monitor(options, index), &video_config.window[index]); if (video_config.mode != VIDEO_MODE_NONE) SetForegroundWindow(win_window_list->hwnd); // possibly create the debug window, but don't show it yet if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED) machine.osd().init_debugger(); }
//============================================================ // osd_start_audio_stream //============================================================ void sdlaudio_init(running_machine &machine) { if (LOG_SOUND) sound_log = fopen(SDLMAME_SOUND_LOG, "w"); // skip if sound disabled if (machine.sample_rate() != 0) { // attempt to initialize SDL if (sdl_init(machine)) return; machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(sdl_cleanup_audio), &machine)); // set the startup volume machine.osd().set_mastervolume(attenuation); } return; }