Quote:
Originally Posted by NiLuJe
@yparitcher: The neat way would be to punt the nightmode handling to the kernel by just flipping the grayscale flag in the fb state instead of ORing the INVERT EPDC flag on each refresh ourselves. This way *every* refresh is inverted, no matter the source.
This is highly platform specific, though (mxcfb @ 8bpp, which, granted, means the full Kobo lineup, the full reMarkable lineup, and every Kindle on FW 5.x. And possibly PB, too).
----
|
this would probably cause the screensaver to also be inverted
Quote:
Originally Posted by NiLuJe
The cheap way would be to simply check the process table for luajit/koreader and skip the fbink_refresh() call if it's up  .
AFAIR, it's a bit gnarly if you want to do it in C, because you're basically reinventing procps, so it may be simpler to just rely on the output from pidof or pgrep.
|
instead of trying to walk procfs i might change my koreader.sh to save a pid file in /var/tmp/ which i can then use to check if koreader is active. this would solve all my problems, also this avoids any double flash even when in regular mode by not refreshing the screen myself.
do you think i could get that merged into koreader as it might be useful for others?