Skip to content

Commit afc4f09

Browse files
committed
bootanim: Allow configurable rescaling
Some themes carry bootanims on specific resolutions that look like crap on different screen densities. We can have scale those into the correct size, now. Change-Id: Ib8ed04899dd46fed33b15d08fce4f7411b925f0c TODO: Plug a sliding scale (and auto-adjust into the theme engine?)
1 parent 2bcb257 commit afc4f09

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

cmds/bootanimation/BootAnimation.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,11 +645,16 @@ bool BootAnimation::movie()
645645
char path[ANIM_ENTRY_NAME_MAX];
646646
char color[7] = "000000"; // default to black if unspecified
647647

648+
char value[PROPERTY_VALUE_MAX];
648649
char pathType;
650+
651+
property_get("persist.bootanimation.scale", value, "1");
652+
double bas = atof(value);
653+
649654
if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) {
650655
// ALOGD("> w=%d, h=%d, fps=%d", width, height, fps);
651-
animation.width = width;
652-
animation.height = height;
656+
animation.width = width * bas;
657+
animation.height = height * bas;
653658
animation.fps = fps;
654659
}
655660
else if (sscanf(l, " %c %d %d %s #%6s", &pathType, &count, &pause, path, color) >= 4) {

0 commit comments

Comments
 (0)