Пример #1
0
void record_movie_start(const char *name)
{
#if 0 /* AdvanceMAME has its record code */
	if (movie_file != NULL)
		mame_fclose(movie_file);

	if (name)
		movie_file = mame_fopen(Machine->gamedrv->name, name, FILETYPE_MOVIE, 1);
	else
		movie_file = mame_fopen_next(FILETYPE_MOVIE);

	movie_frame = 0;
#endif
}
Пример #2
0
void save_screen_snapshot(mame_bitmap *bitmap)
{
#if 1 /* AdvanceMAME has its snapshot code */
	osd_save_snapshot();
#else
	mame_file *fp;

	if ((fp = mame_fopen_next(FILETYPE_SCREENSHOT)) != NULL)
	{
		save_screen_snapshot_as(fp, bitmap);
		mame_fclose(fp);
	}
#endif
}
Пример #3
0
void video_movie_begin_recording(const char *name)
{
	mame_file_error filerr;

	/* close any existing movie file */
	if (movie_file != NULL)
		mame_fclose(movie_file);

	/* create a new movie file and start recording */
	if (name != NULL)
		filerr = mame_fopen(SEARCHPATH_MOVIE, name, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &movie_file);
	else
		filerr = mame_fopen_next(SEARCHPATH_MOVIE, "mng", &movie_file);

	movie_frame = 0;
}
Пример #4
0
void video_save_active_screen_snapshots(void)
{
	UINT32 screenmask = render_get_live_screens_mask();
	mame_file *fp;
	int scrnum;

	/* write one snapshot per visible screen */
	for (scrnum = 0; scrnum < MAX_SCREENS; scrnum++)
		if (screenmask & (1 << scrnum))
		{
			mame_file_error filerr = mame_fopen_next(SEARCHPATH_SCREENSHOT, "png", &fp);
			if (filerr == FILERR_NONE)
			{
				video_screen_save_snapshot(fp, scrnum);
				mame_fclose(fp);
			}
		}
}