From 4e74e525181fa38a868ce2d286e821e6b50f25e5 Mon Sep 17 00:00:00 2001 From: natinusala Date: Mon, 27 May 2019 09:59:41 +0200 Subject: [PATCH 1/2] menu widgets: fix rounding error with timings --- dynamic.c | 2 +- retroarch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamic.c b/dynamic.c index 77b45ee333..3dd7f6cb8b 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1263,7 +1263,7 @@ bool rarch_environment_cb(unsigned cmd, void *data) const struct retro_message *msg = (const struct retro_message*)data; RARCH_LOG("Environ SET_MESSAGE: %s\n", msg->msg); #ifdef HAVE_MENU_WIDGETS - if (!menu_widgets_set_libretro_message(msg->msg, msg->frames / 60 * 1000)) + if (!menu_widgets_set_libretro_message(msg->msg, roundf((float)msg->frames / 60.0f * 1000.0f))) #endif runloop_msg_queue_push(msg->msg, 3, msg->frames, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); break; diff --git a/retroarch.c b/retroarch.c index 68c9c195e3..9908e79556 100644 --- a/retroarch.c +++ b/retroarch.c @@ -3210,7 +3210,7 @@ void runloop_msg_queue_push(const char *msg, runloop_ctx_msg_info_t msg_info; #if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS) if (menu_widgets_msg_queue_push(msg, - duration / 60 * 1000, title, icon, category, prio, flush)) + roundf((float)duration / 60.0f * 1000.0f), title, icon, category, prio, flush)) return; #endif From d50e3268251e579aae2ba3a814119e798cf8c2b1 Mon Sep 17 00:00:00 2001 From: natinusala Date: Mon, 27 May 2019 10:10:50 +0200 Subject: [PATCH 2/2] menu display: don't cancel scissoring if the rect is empty --- menu/menu_driver.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index bcabff372e..fd7ea27e69 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -517,10 +517,6 @@ void menu_display_scissor_begin(video_frame_info_t *video_info, int x, int y, un height = menu_display_framebuf_height - y; if ((x + width) > menu_display_framebuf_width) width = menu_display_framebuf_width - x; - if (height <= 0) - return; - if (width <= 0) - return; menu_disp->scissor_begin(video_info, x, y, width, height); }