Recovery UI meet issue if image size is too large
When display screen size is too small, some images in recovery resource cannot caculate the right display position. So the image cannot show in the screen. Limit the calculated position to avoid such issue. Change-Id: Iebebfe0dfbc568ee3a6b6a31b81d060b3ce5f940 Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
This commit is contained in:
parent
5ac6163822
commit
0d81b89472
1 changed files with 3 additions and 1 deletions
|
@ -448,7 +448,9 @@ void ScreenRecoveryUI::draw_foreground_locked() {
|
|||
int frame_height = gr_get_height(frame);
|
||||
int frame_x = (ScreenWidth() - frame_width) / 2;
|
||||
int frame_y = GetAnimationBaseline();
|
||||
DrawSurface(frame, 0, 0, frame_width, frame_height, frame_x, frame_y);
|
||||
if (frame_x >= 0 && frame_y >= 0 && (frame_x + frame_width) < ScreenWidth() &&
|
||||
(frame_y + frame_height) < ScreenHeight())
|
||||
DrawSurface(frame, 0, 0, frame_width, frame_height, frame_x, frame_y);
|
||||
}
|
||||
|
||||
if (progressBarType != EMPTY) {
|
||||
|
|
Loading…
Reference in a new issue