1
0

Implemented nickel_misc:home action (closes #39) (#44)

This commit is contained in:
Patrick Gaskin
2020-06-15 16:12:14 -04:00
committed by GitHub
parent 2b40ede252
commit 7f52a8165e
2 changed files with 9 additions and 1 deletions

View File

@@ -58,6 +58,7 @@
# sudoku
# word_scramble
# nickel_misc - one of:
# home - goes to the home screen
# force_usb_connection - forces a usb connection dialog to be shown
# rescan_books - forces nickel to rescan books (4.13.12638+)
# rescan_books_full - forces a full usb connect/disconnect cycle (4.13.12638+)

View File

@@ -355,7 +355,14 @@ NM_ACTION_(nickel_extras) {
NM_ACTION_(nickel_misc) {
#define NM_ERR_RET nullptr
if (!strcmp(arg, "rescan_books")) {
if (!strcmp(arg, "home")) {
//libnickel 4.6 * _ZN19StatusBarController4homeEv
void (*StatusBarController_home)();
reinterpret_cast<void*&>(StatusBarController_home) = dlsym(RTLD_DEFAULT, "_ZN19StatusBarController4homeEv");
NM_ASSERT(StatusBarController_home, "could not dlsym StatusBarController::home");
StatusBarController_home();
} else if (!strcmp(arg, "rescan_books")) {
//libnickel 4.13.12638 * _ZN19PlugWorkflowManager14sharedInstanceEv
PlugWorkflowManager *(*PlugWorkflowManager_sharedInstance)();
reinterpret_cast<void*&>(PlugWorkflowManager_sharedInstance) = dlsym(RTLD_DEFAULT, "_ZN19PlugWorkflowManager14sharedInstanceEv");