menu display: don't move scissoring rect

don't just return from the function either, instead set w/h to 0
This commit is contained in:
BringerethOfLight 2019-05-27 15:55:50 +00:00
parent 8e4dc6f007
commit 50720f0a92
2 changed files with 22 additions and 2 deletions

View File

@ -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 $@),)

View File

@ -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)