In font selection menus, ask creengine for italic versions
of fonts if there's no regular version to preview.
Also prevents a crash when a font can't be previewed in
the font family menu.
Use `ANDROID_NAME` for last part so setting it as an environment
variable to something like `dev` allows for a stable APK name
across different revisions.
setIcon recreates the frame without preserving the current frame's
invert status (which is arguably a bug, but button is so ubuquitous that
I dare not touch that behavior...).
So, instead, rely on the rarely used preselect flag to preserve it.
When footnotes are displayed as "popups", they're displayed over ReaderUI
in a BottomContainer, so they pretty much always cover the footer ;).
(i.e., they're really really not popups *at all* :D).
This prevents spurious status bar auto-refreshes.
Re #12323
Factorize (options handling, target setup, …), add explicit
Android targets (`android-arm`, `android-arm64`, etc…).
build:
- support `--no-build` / `-b`: only run setup phase
check: simplify implementation (re-use `.ci/check.sh`)
cov & test:
- forward to makefile rules (no need to guess install directory)
- support `--no-build` / `-b`: use existing build
log:
- drop the target argument (since only Android is supported anyway)
prompt & wbuilder:
- forward to makefile rules (no need to guess install directory)
- support `--no-build` / `-b`: use existing build
release:
- support `--no-build` / `-b`: use existing build
run:
- forward to makefile rules (no need to guess install directory)
- correctly support relative arguments, and whitespace in arguments
- drop support for catchsegv: Glibc 2.35 (2022) dropped catchsegv and
associated `libSegFault.so` shared library
- drop support for nemiver debugger: project is dead, last release
was 8 years ago, repo is archived, and package has been dropped
from newer Debian / Ubuntu releases
- support running an APK passed as argument when using `android` target
- rename short `-d`, `-h`, and `-w` options to `-D`, `-H` and `-W`
respectively (to avoid conflicts with standard options)
- drop support for `-p` / `--graph` argument: code moved to a dedicated
wrapper script (`tools/graph_memory.sh`) that can be used with the new
`-w` / `--wrap` argument: `./kodev run -w tools/graph_memory.sh …`
- drop `--tui` argument when using GDB: said TUI does not cohabit well
with KOReader console outputs (and cgdb is better fancy TUI anyway)
I don't even remember how badly things broke (at least on old devices) without it, despite it making absolutely no sense at all (state-extended just flips a global that dictates whether some things get flagged as wakeup sources or not).
So, don't rock the boat too much: we don't remove it, but instead of using a sleep, we use a task deadline instead, which ensures we'll keep processing input events in the right order in the meantime. We'll already have neutered input by this point, so we'll only process power events anyway.
That means that the only iffy things are potentially *when* and *where* we have to potentially cancel that task. Resume makes sense, of course, and we log an info message to make the log flow clear; but we also do so in suspend... just in case. With a warning log because that probably indicates something fishy went on.
Also cleanup the comments while I'm there, and actually rewrite the wakeup_count stuff properly so it could actually theoretically be used if ntx kernels were actually reliable. Spoiler alert: they're not, this is still horribly broken on at least Mk < 7. Works just fine on a Forma, though, so, yay.
Fix#12325
Input events from ImageViewer can be caught between it clearing an old
ImageWidget & instantiating a new one, but before the new one has had a
chance to actually render anything.
Fix#12327
- out-of-tree luajit-launcher build: no leftovers after `make clean`
- use the luajit library compiled by base: no point wasting time
building a second (different, possibly incompatible) version
AFAICT, this has never worked since the KPV -> KOReader refactor, as it relies on a weird little DrawContext "feature", while the actually in-use rotation framework is handled via BlitBuffer.
That kludge pollutes *a lot* of both the backend and frontend code, so I plan to annihilate that in a followup PR.
See #12303 for more context
* Use a dedicated cache hash for partial tiles from panel-zoom
* Never dump them to disk, as it confuses DocCache's crappy heuristics that rewinds the cache to skip over the hinted page to try to dump the on-screen page to disk.
* Apply the zoom factor in the exact same way as any other page rect (i.e., floor coordinates, ceil dimensions), and make sure said rect is actually a Geom so it doesn't break the cache hash, which relies on Geom's custom tostring method for rects. Said scaling method *also* belongs to the Geom class anyway.
* Handle such pre-scaled rects properly in renderPage, so as not to apply the zoom factor to the full page, which would attempt to create a gigantic buffer.
* And now that the rect is rendered properly in an appropriately-sized buffer, use the rendered tile as-is, no need to blit it to another (potentially way too large because of the above issue) blank BB.
* The zoom factor is now computed for a scale to best-fit (honoring `imageviewer_rotate_auto_for_best_fit`), ensuring the best efficiency (ImageViewer won't have to re-scale).
* Cache: Reduce the maximum item size to 50% of the cache, instead of 75%.
* Warn about the legacy ReaderRotation module, as it turned out to be horribly broken. The whole machinery (which is spread over *a lot* of various codepaths) is left as-is, peppered with notes & fixmes hinting at the problem. Thankfully, that's not how we actually handle rotation, so it was probably hardly ever used (which possibly explains why nobody ever noticed it breaking, and that nugget possibly dates back to the inception of the kpv -> ko refactor!). (#12309)