mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-02 17:53:40 +00:00
Create video_driver_get_status
This commit is contained in:
parent
be617c530b
commit
a151c24117
@ -2386,3 +2386,9 @@ void video_driver_get_window_title(char *buf, unsigned len)
|
||||
video_driver_window_title_update = false;
|
||||
}
|
||||
}
|
||||
|
||||
void video_driver_get_status(uint64_t *frame_count, bool * is_alive)
|
||||
{
|
||||
*frame_count = video_driver_get_frame_count();
|
||||
*is_alive = video_driver_is_alive();
|
||||
}
|
||||
|
@ -558,6 +558,8 @@ void video_driver_reinit(void);
|
||||
|
||||
void video_driver_get_window_title(char *buf, unsigned len);
|
||||
|
||||
void video_driver_get_status(uint64_t *frame_count, bool * is_alive);
|
||||
|
||||
extern video_driver_t video_gl;
|
||||
extern video_driver_t video_vulkan;
|
||||
extern video_driver_t video_psp1;
|
||||
|
@ -678,7 +678,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
* d) Video driver no longer alive.
|
||||
* e) End of BSV movie and BSV EOF exit is true. (TODO/FIXME - explain better)
|
||||
*/
|
||||
#define time_to_exit(quit_key_pressed) (runloop_shutdown_initiated || quit_key_pressed || !video_driver_is_alive() || bsv_movie_ctl(BSV_MOVIE_CTL_END_EOF, NULL) || (runloop_max_frames && (video_driver_get_frame_count() >= runloop_max_frames)) || runloop_exec)
|
||||
#define time_to_exit(quit_key_pressed) (runloop_shutdown_initiated || quit_key_pressed || !is_alive || bsv_movie_ctl(BSV_MOVIE_CTL_END_EOF, NULL) || (runloop_max_frames && (frame_count >= runloop_max_frames)) || runloop_exec)
|
||||
|
||||
#define runloop_check_cheevos() (settings->cheevos.enable && cheevos_loaded && (!cheats_are_enabled && !cheats_were_enabled))
|
||||
|
||||
@ -697,9 +697,13 @@ static enum runloop_state runloop_check_state(
|
||||
#ifdef HAVE_NETWORKING
|
||||
bool tmp = false;
|
||||
#endif
|
||||
bool is_alive = false;
|
||||
uint64_t frame_count = 0;
|
||||
bool focused = true;
|
||||
bool pause_pressed = runloop_cmd_triggered(trigger_input, RARCH_PAUSE_TOGGLE);
|
||||
|
||||
video_driver_get_status(&frame_count, &is_alive);
|
||||
|
||||
if (runloop_cmd_triggered(trigger_input, RARCH_OVERLAY_NEXT))
|
||||
command_event(CMD_EVENT_OVERLAY_NEXT, NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user