Take max frames out of runloop

This commit is contained in:
twinaphex 2015-08-03 19:49:34 +02:00
parent 652e614707
commit e43f54f7c1
3 changed files with 4 additions and 9 deletions

View File

@ -505,7 +505,6 @@ enum rarch_content_type rarch_path_is_media_type(const char *path)
static void parse_input(int argc, char *argv[])
{
const char *optstring = NULL;
runloop_t *runloop = rarch_main_get_ptr();
global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr();
@ -839,7 +838,7 @@ static void parse_input(int argc, char *argv[])
break;
case RA_OPT_MAX_FRAMES:
runloop->frames.video.max = strtoul(optarg, NULL, 10);
global->max_frames = strtoul(optarg, NULL, 10);
break;
case RA_OPT_SUBSYSTEM:

View File

@ -616,8 +616,7 @@ static INLINE int time_to_exit(driver_t *driver, global_t *global,
bool video_alive = video && video->alive(driver->video_data);
bool movie_end = (global->bsv.movie_end && global->bsv.eof_exit);
uint64_t frame_count = video_driver_get_frame_count();
bool frame_count_end = (runloop->frames.video.max &&
frame_count >= runloop->frames.video.max);
bool frame_count_end = global->max_frames && (frame_count >= global->max_frames);
if (shutdown_pressed || cmd->quit_key_pressed || frame_count_end || movie_end
|| !video_alive)

View File

@ -44,11 +44,6 @@ typedef struct runloop
struct
{
struct
{
unsigned max;
} video;
struct
{
retro_time_t minimum_time;
@ -67,6 +62,8 @@ typedef struct rarch_resolution
typedef struct global
{
unsigned max_frames;
bool verbosity;
bool perfcnt_enable;
bool force_fullscreen;