diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-02-21 11:41:27 +0000 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-10-04 18:48:36 +0100 |
commit | afc4f0965798a0fbec6315a6cf59365a26a69d6f (patch) | |
tree | e49f9908bd0bc7db4a1e229ca83c3d9897b470a7 /cmds/bootanimation | |
parent | 2bcb2570e9b9e6eb60c585798244e9b1475ec2e3 (diff) | |
download | frameworks_base-afc4f0965798a0fbec6315a6cf59365a26a69d6f.zip frameworks_base-afc4f0965798a0fbec6315a6cf59365a26a69d6f.tar.gz frameworks_base-afc4f0965798a0fbec6315a6cf59365a26a69d6f.tar.bz2 |
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?)
Diffstat (limited to 'cmds/bootanimation')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index c4a73d1..8878d05 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -645,11 +645,16 @@ bool BootAnimation::movie() char path[ANIM_ENTRY_NAME_MAX]; char color[7] = "000000"; // default to black if unspecified + char value[PROPERTY_VALUE_MAX]; char pathType; + + property_get("persist.bootanimation.scale", value, "1"); + double bas = atof(value); + if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) { // ALOGD("> w=%d, h=%d, fps=%d", width, height, fps); - animation.width = width; - animation.height = height; + animation.width = width * bas; + animation.height = height * bas; animation.fps = fps; } else if (sscanf(l, " %c %d %d %s #%6s", &pathType, &count, &pause, path, color) >= 4) { |