mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Take max frames out of runloop
This commit is contained in:
parent
652e614707
commit
e43f54f7c1
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user