Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input/Kindle: Forward the arguments from wakeupFromSuspend & readyToSuspend #1727

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions input/input-kindle.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ static void generateFakeEvent(int pipefd[2]) {
sendEvent(pipefd[1], &ev);
} else if(std_out[0] == 'w') {
ev.code = CODE_FAKE_WAKEUP_FROM_SUSPEND;
// Pass along the timestamp
ev.value = strtol_d(std_out + sizeof("wakeupFromSuspend"));
sendEvent(pipefd[1], &ev);
ev.value = 1;
} else if(std_out[0] == 'r') {
ev.code = CODE_FAKE_READY_TO_SUSPEND;
// Pass along the delay
ev.value = strtol_d(std_out + sizeof("readyToSuspend"));
sendEvent(pipefd[1], &ev);
ev.value = 1;
} else {
fprintf(stderr, "[ko-input]: Unrecognized powerd event: `%.*s`.\n", (int) (sizeof(std_out) - 1U), std_out);
}
Expand Down