void osd_common_t::init_subsystems() { if (!video_init()) { video_exit(); osd_printf_error("video_init: Initialization failed!\n\n\n"); fflush(stderr); fflush(stdout); exit(-1); } input_init(); // we need pause callbacks machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(osd_common_t::input_pause), this)); machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(osd_common_t::input_resume), this)); output_init(); m_font_module = select_module_options<font_module *>(options(), OSD_FONT_PROVIDER); m_sound = select_module_options<sound_module *>(options(), OSD_SOUND_PROVIDER); m_sound->m_sample_rate = options().sample_rate(); m_sound->m_audio_latency = options().audio_latency(); m_debugger = select_module_options<debug_module *>(options(), OSD_DEBUG_PROVIDER); select_module_options<netdev_module *>(options(), OSD_NETDEV_PROVIDER); m_midi = select_module_options<midi_module *>(options(), OSD_MIDI_PROVIDER); m_mod_man.init(options()); }
void void_exit( void ) { phys_exit(); script_exit(); net_exit(); input_exit(); audio_exit(); video_exit(); log_exit(); }
void osd_interface::exit_subsystems() { video_exit(); sound_exit(); input_exit(); output_exit(); #ifdef USE_NETWORK network_exit(); #endif midi_exit(); debugger_exit(); }
bitmap_t* bitmap_read(const char* filename) { bitmap_t* bmp = (bitmap_t*) malloc(sizeof(bitmap_t)); FILE *fp = fopen(filename, "rb"); if (fp == NULL) { video_exit(); printf("arkanix::bitmap not found %s\n", filename); exit(1); } BitmapFileHeader bitmapFileHeader; fread(&bitmapFileHeader, sizeof(bitmapFileHeader), 1, fp); if (bitmapFileHeader.magic != 0x4D42) { fclose(fp); return NULL; } BitmapInfoHeader bitmapInfoHeader; fread(&bitmapInfoHeader, sizeof(bitmapInfoHeader), 1, fp); fseek(fp, bitmapFileHeader.offset, SEEK_SET); short* bitmapImage = (short*) malloc(bitmapInfoHeader.image_sz); if (!bitmapImage) { free(bitmapImage); fclose(fp); return NULL; } fread((char*) bitmapImage, bitmapInfoHeader.image_sz, 1, fp); if (bitmapImage == NULL) { fclose(fp); return NULL; } fclose(fp); bmp->bitmapData = bitmapImage; bmp->bitmapFileHeader = bitmapFileHeader; bmp->bitmapInfoHeader = bitmapInfoHeader; return bmp; }
void osd_common_t::init_subsystems() { // monitors have to be initialized before video init m_monitor_module = select_module_options<monitor_module *>(options(), OSD_MONITOR_PROVIDER); assert(m_monitor_module != nullptr); m_monitor_module->init(options()); if (!video_init()) { video_exit(); osd_printf_error("video_init: Initialization failed!\n\n\n"); fflush(stderr); fflush(stdout); exit(-1); } m_keyboard_input = select_module_options<input_module *>(options(), OSD_KEYBOARDINPUT_PROVIDER); m_mouse_input = select_module_options<input_module *>(options(), OSD_MOUSEINPUT_PROVIDER); m_lightgun_input = select_module_options<input_module *>(options(), OSD_LIGHTGUNINPUT_PROVIDER); m_joystick_input = select_module_options<input_module *>(options(), OSD_JOYSTICKINPUT_PROVIDER); m_font_module = select_module_options<font_module *>(options(), OSD_FONT_PROVIDER); m_sound = select_module_options<sound_module *>(options(), OSD_SOUND_PROVIDER); m_sound->m_sample_rate = options().sample_rate(); m_sound->m_audio_latency = options().audio_latency(); m_debugger = select_module_options<debug_module *>(options(), OSD_DEBUG_PROVIDER); select_module_options<netdev_module *>(options(), OSD_NETDEV_PROVIDER); m_midi = select_module_options<midi_module *>(options(), OSD_MIDI_PROVIDER); m_output = select_module_options<output_module *>(options(), OSD_OUTPUT_PROVIDER); m_output->set_machine(&machine()); machine().output().set_notifier(nullptr, output_notifier_callback, this); m_mod_man.init(options()); input_init(); // we need pause callbacks machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(osd_common_t::input_pause), this)); machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(osd_common_t::input_resume), this)); }
void osd_interface::init_subsystems() { if (!video_init()) { video_exit(); osd_printf_error("video_init: Initialization failed!\n\n\n"); fflush(stderr); fflush(stdout); exit(-1); } sound_init(); input_init(); // we need pause callbacks machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(osd_interface::input_pause), this)); machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(osd_interface::input_resume), this)); output_init(); #ifdef USE_NETWORK network_init(); #endif midi_init(); }
void osd_common_t::exit_subsystems() { video_exit(); }
void osd_common_t::exit_subsystems() { video_exit(); input_exit(); output_exit(); }