From 50720f0a92f9dbcba00d25e0cd52740e60ab9982 Mon Sep 17 00:00:00 2001 From: BringerethOfLight Date: Mon, 27 May 2019 15:55:50 +0000 Subject: [PATCH] menu display: don't move scissoring rect don't just return from the function either, instead set w/h to 0 --- Makefile | 2 ++ menu/menu_driver.c | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 32e7a6b82b..3c12c1ed22 100644 --- a/Makefile +++ b/Makefile @@ -186,10 +186,12 @@ ifeq ($(MAKECMDGOALS),clean) config.mk: else -include $(RARCH_OBJ:.o=.d) +ifeq ($(HAVE_CONFIG_MK),) config.mk: configure qb/* @echo "config.mk is outdated or non-existing. Run ./configure again." @exit 1 endif +endif retroarch: $(RARCH_OBJ) @$(if $(Q), $(shell echo echo LD $@),) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index fd7ea27e69..020fd4b17b 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -506,13 +506,31 @@ void menu_display_scissor_begin(video_frame_info_t *video_info, int x, int y, un if (menu_disp && menu_disp->scissor_begin) { if (y < 0) + { + if (height < (unsigned)(-y)) + height = 0; + else + height += y; y = 0; + } if (x < 0) + { + if (width < (unsigned)(-x)) + width = 0; + else + width += x; x = 0; + } if (y >= (int)menu_display_framebuf_height) - return; + { + height = 0; + y = 0; + } if (x >= (int)menu_display_framebuf_width) - return; + { + width = 0; + x = 0; + } if ((y + height) > menu_display_framebuf_height) height = menu_display_framebuf_height - y; if ((x + width) > menu_display_framebuf_width)