summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2020-12-07 02:09:06 -0500
committerFranklin Wei <franklin@rockbox.org>2020-12-07 02:11:32 -0500
commitb7ce408f65b92b080337b3670da54e3c3aab79c5 (patch)
tree6a6deb6b3656527de54f8e7c29fc012bb6668a1c
parent84cd812ccd3c5dd0c3af29300c5c6d4d6b1f9743 (diff)
downloadrockbox-b7ce408f65b92b080337b3670da54e3c3aab79c5.tar.gz
rockbox-b7ce408f65b92b080337b3670da54e3c3aab79c5.tar.bz2
rockbox-b7ce408f65b92b080337b3670da54e3c3aab79c5.zip
puzzles: update frontend for new midend_get_cursor_location semantics
midend_get_cursor_location now returns a bool indicating success. Change-Id: Ie3e7130a821b6619c829846177baf2cc6b51e3a3
-rw-r--r--apps/plugins/puzzles/rockbox.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c
index 08581db1c6..73f9857b4a 100644
--- a/apps/plugins/puzzles/rockbox.c
+++ b/apps/plugins/puzzles/rockbox.c
@@ -1566,8 +1566,7 @@ static void rb_end_draw(void *handle)
{
rb->lcd_set_foreground(LCD_RGBPACK(255,0,255));
int x, y, w, h;
- midend_get_cursor_location(me, &x, &y, &w, &h);
- if(x >= 0)
+ if(midend_get_cursor_location(me, &x, &y, &w, &h))
rb->lcd_drawrect(x, y, w, h);
}
@@ -2230,10 +2229,7 @@ static void zoom_center_on_cursor(void) {
/* get cursor bounding rectangle */
int x, y, w, h;
- midend_get_cursor_location(me, &x, &y, &w, &h);
-
- /* no cursor */
- if(x < 0)
+ if(!midend_get_cursor_location(me, &x, &y, &w, &h))
return;
/* check if either of the top-left and bottom-right corners are