forked from len0rd/rockbox
puzzles: update frontend for new midend_get_cursor_location semantics
midend_get_cursor_location now returns a bool indicating success. Change-Id: Ie3e7130a821b6619c829846177baf2cc6b51e3a3
This commit is contained in:
parent
84cd812ccd
commit
b7ce408f65
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue