示例#1
0
文件: video.c 项目: Ilgrim/MAMEHub
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();
}
示例#2
0
int sdlvideo_init(running_machine &machine)
{
	int index;

	// extract data from the options
	extract_video_config(machine);

	// ensure we get called on the way out
	machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(video_exit), &machine));

	// set up monitors first
	init_monitors();

	// we need the beam width in a float, contrary to what the core does.
	video_config.beamwidth = machine.options().beam();

	// initialize the window system so we can make windows
	if (sdlwindow_init(machine))
		return 1;

	// create the windows
	sdl_options &options = downcast<sdl_options &>(machine.options());
	for (index = 0; index < video_config.numscreens; index++)
	{
		sdl_window_config conf;
		memset(&conf, 0, sizeof(conf));
		extract_window_config(machine, index, &conf);
		if (sdlwindow_video_window_create(machine, index, pick_monitor(options, index), &conf))
			return 1;
	}

	return 0;
}
示例#3
0
int winvideo_init(running_machine *machine)
{
	const char *stemp;
	int index;

	// ensure we get called on the way out
	add_exit_callback(machine, video_exit);

	// extract data from the options
	extract_video_config();

	// set up monitors first
	init_monitors();

	// initialize the window system so we can make windows
	if (winwindow_init(machine))
		goto error;

	// create the windows
	for (index = 0; index < video_config.numscreens; index++)
		if (winwindow_video_window_create(index, pick_monitor(index), &video_config.window[index]))
			goto error;
	if (video_config.mode != VIDEO_MODE_NONE)
		SetForegroundWindow(win_window_list->hwnd);

	// possibly create the debug window, but don't show it yet
#ifdef MAME_DEBUG
	if (options.mame_debug)
		if (debugwin_init_windows())
			return 1;
#endif

	// start recording movie
	stemp = options_get_string("mngwrite");
	if (stemp != NULL)
		video_movie_begin_recording(stemp);

	// if we're running < 5 minutes, allow us to skip warnings to facilitate benchmarking/validation testing
	if (video_config.framestorun > 0 && video_config.framestorun < 60*60*5)
		options.skip_warnings = options.skip_gameinfo = options.skip_disclaimer = TRUE;

	return 0;

error:
	return 1;
}
示例#4
0
FePresent::FePresent( FeSettings *fesettings, FeFontContainer &defaultfont )
    : m_feSettings( fesettings ),
      m_currentFont( &defaultfont ),
      m_defaultFont( defaultfont ),
      m_baseRotation( FeSettings::RotateNone ),
      m_toggleRotation( FeSettings::RotateNone ),
      m_playMovies( true ),
      m_user_page_size( -1 ),
      m_preserve_aspect( false ),
      m_custom_overlay( false ),
      m_listBox( NULL ),
      m_emptyShader( NULL ),
      m_overlay_caption( NULL ),
      m_overlay_lb( NULL )
{
    m_layoutFontName = m_feSettings->get_info( FeSettings::DefaultFont );
    init_monitors();
}
示例#5
0
bool windows_osd_interface::video_init()
{
	int index;

	// 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);

	return true;
}
示例#6
0
bool windows_osd_interface::video_init()
{
	// extract data from the options
	extract_video_config();

	// set up monitors first
	init_monitors();

	// initialize the window system so we can make windows
	window_init();

	// create the windows
	windows_options &options = downcast<windows_options &>(machine().options());
	for (int index = 0; index < video_config.numscreens; index++)
	{
		win_window_info::create(machine(), index, osd_monitor_info::pick_monitor(options, index), &windows[index]);
	}

	if (video_config.mode != VIDEO_MODE_NONE)
		SetForegroundWindow(osd_common_t::s_window_list.front()->platform_window<HWND>());

	return true;
}