Skip to content

Commit

Permalink
Kobo: Fix the upgrade progress bar on sunxi
Browse files Browse the repository at this point in the history
Merges are extremely broken outside of REAGL/REAGLD on recent kernels,
while things appear to mostly behave with REAGL, so, use that...

(AUTO was a bad call on sunxi anyway)
  • Loading branch information
NiLuJe authored and poire-z committed Jan 19, 2022
1 parent 40116fa commit 2c94291
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion platform/kobo/koreader.sh
Expand Up @@ -96,7 +96,15 @@ ko_update_check() {
# Setup the FBInk daemon
export FBINK_NAMED_PIPE="/tmp/koreader.fbink"
rm -f "${FBINK_NAMED_PIPE}"
FBINK_PID="$(./fbink --daemon 1 %KOREADER% -q -y -6 -P 0)"
# We'll want to use REAGL on sunxi, because AUTO is slow, and fast merges are extremely broken outside of REAGL...
eval "$(fbink -e | tr ';' '\n' | grep -e isSunxi | tr '\n' ';')"
# shellcheck disable=SC2154
if [ "${isSunxi}" = "1" ]; then
PBAR_WFM="REAGL"
else
PBAR_WFM="AUTO"
fi
FBINK_PID="$(./fbink --daemon 1 %KOREADER% -q -y -6 -P 0 -W ${PBAR_WFM})"
# NOTE: See frontend/ui/otamanager.lua for a few more details on how we squeeze a percentage out of tar's checkpoint feature
# NOTE: %B should always be 512 in our case, so let stat do part of the maths for us instead of using %s ;).
FILESIZE="$(stat -c %b "${NEWUPDATE}")"
Expand Down

0 comments on commit 2c94291

Please sign in to comment.