diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-09 05:15:48 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-09 05:15:48 +0000 |
commit | 4cd805cfaf88cee4b725b38f6a44b870f4c653e3 (patch) | |
tree | bb341231d25dae267fbb6266cd5f35f60db2d73d | |
parent | 892332ce87361e2a7a600ed85914d1f31769ec7d (diff) | |
download | rockbox-4cd805cfaf88cee4b725b38f6a44b870f4c653e3.tar.gz rockbox-4cd805cfaf88cee4b725b38f6a44b870f4c653e3.zip |
Fix the error condition to actually set the fullscreen viewport. Also remove a comment which doesnt really add anything.. the comments 15lines above it explain whats happening
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23575 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/viewport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index b14cbf6649..063f59cec6 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -387,15 +387,15 @@ void viewport_set_defaults(struct viewport *vp, | |||
387 | { | 387 | { |
388 | /* copy from ui vp first (for other field),fix coordinates after */ | 388 | /* copy from ui vp first (for other field),fix coordinates after */ |
389 | *vp = *user_setting; | 389 | *vp = *user_setting; |
390 | /* interesect so that the ui viewport is cropped so that it | ||
391 | * is completely within the info vp */ | ||
392 | vp->x = MAX(a->x, b->x); | 390 | vp->x = MAX(a->x, b->x); |
393 | vp->y = MAX(a->y, b->y); | 391 | vp->y = MAX(a->y, b->y); |
394 | vp->width = MIN(a->x + a->width, b->x + b->width) - vp->x; | 392 | vp->width = MIN(a->x + a->width, b->x + b->width) - vp->x; |
395 | vp->height = MIN(a->y + a->height, b->y + b->height) - vp->y; | 393 | vp->height = MIN(a->y + a->height, b->y + b->height) - vp->y; |
396 | return; | 394 | return; |
397 | } | 395 | } |
398 | /* else take info vp below */ | 396 | else /* They don't overlap, so the best wrong answer is show fullscreen */ |
397 | viewport_set_fullscreen(vp, screen); | ||
398 | |||
399 | } | 399 | } |
400 | /* if only one is active use it | 400 | /* if only one is active use it |
401 | * or if the above check for overlapping failed, use info vp then, because | 401 | * or if the above check for overlapping failed, use info vp then, because |