mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Tweak the 'IR down on resume' workaround...
Only apply it when started from nickel, because I'm guessing we'd have seen a number of reports of this if it happened more widely...
This commit is contained in:
@@ -144,10 +144,12 @@ end
|
||||
function Kobo:resume()
|
||||
os.execute("echo 0 > /sys/power/state-extended")
|
||||
-- cf. #1862, I can reliably break IR touch input on resume...
|
||||
local f = io.open("/sys/devices/virtual/input/input1/neocmd", "r")
|
||||
if f ~= nil then
|
||||
io.close(f)
|
||||
os.execute("echo 'a' > /sys/devices/virtual/input/input1/neocmd")
|
||||
if os.getenv("FROM_NICKEL") == "true" then
|
||||
local f = io.open("/sys/devices/virtual/input/input1/neocmd", "r")
|
||||
if f ~= nil then
|
||||
io.close(f)
|
||||
os.execute("echo 'a' > /sys/devices/virtual/input/input1/neocmd")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ export EXT_FONT_DIR="/mnt/onboard/fonts"
|
||||
|
||||
# fast and dirty way of check if we are called from nickel
|
||||
# through fmon, or from another launcher (KSM or advboot)
|
||||
from_nickel="false"
|
||||
export FROM_NICKEL="false"
|
||||
if pkill -0 nickel ; then
|
||||
from_nickel="true"
|
||||
FROM_NICKEL="true"
|
||||
fi
|
||||
|
||||
if [ "${from_nickel}" == "true" ] ; then
|
||||
if [ "${FROM_NICKEL}" == "true" ] ; then
|
||||
# Siphon a few things from nickel's env...
|
||||
eval "$(xargs -n 1 -0 < /proc/$(pidof nickel)/environ | grep -e DBUS_SESSION_BUS_ADDRESS -e WIFI_MODULE -e PLATFORM -e WIFI_MODULE_PATH -e INTERFACE -e PRODUCT 2>/dev/null)"
|
||||
export DBUS_SESSION_BUS_ADDRESS WIFI_MODULE PLATFORM WIFI_MODULE_PATH INTERFACE PRODUCT
|
||||
@@ -87,7 +87,7 @@ fi
|
||||
|
||||
./reader.lua "${args}" 2> crash.log
|
||||
|
||||
if [ "${from_nickel}" == "true" ] ; then
|
||||
if [ "${FROM_NICKEL}" == "true" ] ; then
|
||||
# start kobo software because it was running before koreader
|
||||
./nickel.sh &
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user