Skip to content

Commit

Permalink
New "Remove title from reading header/footer" patch
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaskin committed Sep 17, 2019
1 parent d7f9c1f commit 7525bc7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/versions/4.17.13651/libnickel.so.1.0.0.yaml/geek1011.yaml
Expand Up @@ -220,6 +220,26 @@ Allow showing info panel on random screensaver:
for the screensaver to show).
- ReplaceBytesNOP: {Offset: 0xA28228, FindBLX: 0x452DC4}

Remove title from reading header/footer:
- Enabled: no
- Description: Removes the chapter/book title from the new reading header/footer.
# In the longest form of ReadingFooter::update (the others are wrappers with
# the args being set to the current value), the first one is the title. The
# final string is created by starting with the title, then appending the "-",
# then the page number / percentage / etc text.
#
# This one is slightly unusual in that the reading header also shares the
# ReadingFooter code (ReadingView::updateProgressHeader only has the page text,
# and it ends with a branch to ReadingFooter::update). This means we only have
# to patch one place, but it also means you can't have the title in one, but
# not the other.
#
# We'll patch this in a slightly hacky and inefficient, but simple and easy-to-update
# way by replacing the first QString::append (the dash) with a QString::resize
# to zero (I would have done a QString::clear, but that symbol isn't imported):
- ReplaceBytes: {Offset: 0xB6D00E, FindH: F9 68, ReplaceH: 00 21} # replace LDR r1, [...] with MOV r1, #0 (the LDR doesn't matter, but will need to be updated)
- ReplaceBLX: {Offset: 0xB6D012, Find: 0x4503D8, Replace: 0x430DC8}

# The following patches allow you to enable a config file option with a patch.

FeatureSettings - BookSpecificStats:
Expand Down
1 change: 1 addition & 0 deletions src/versions/4.17.13651/patches.md
Expand Up @@ -14,6 +14,7 @@ and rewriting (TODO17:REWRITE). These markers will all need to be dealt with and
removed before the final release.

## Added
- geek1011 / Remove title from reading header/footer

### TODO

Expand Down

0 comments on commit 7525bc7

Please sign in to comment.