menu widgets: reimplement FPS counter

This commit is contained in:
natinusala 2019-04-08 16:33:18 +02:00
parent e6efc02457
commit 7a3caf82d0

View File

@ -47,6 +47,9 @@
#ifdef HAVE_MENU
#include "../menu/menu_driver.h"
#include "../menu/menu_setting.h"
#ifdef HAVE_MENU_WIDGETS
#include "../menu/widgets/menu_widgets.h"
#endif
#endif
#include "video_thread_wrapper.h"
@ -2596,7 +2599,10 @@ void video_driver_frame(const void *data, unsigned width,
/* Display the FPS, with a higher priority. */
if (video_info.fps_show || video_info.framecount_show)
runloop_msg_queue_push(video_info.fps_text, 2, 1, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!video_driver_has_widgets() || !menu_widgets_set_fps_text(video_info.fps_text))
#endif
runloop_msg_queue_push(video_info.fps_text, 2, 1, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
/* trigger set resolution*/
if (video_info.crt_switch_resolution)