From eb695a3f3bc8199ff5def4c466842f3839721f67 Mon Sep 17 00:00:00 2001 From: Anachronaut Date: Thu, 3 Sep 2026 12:52:17 -0400 Subject: [PATCH] --keyboard was a flag that did nothing behind a window Voyager installed its own input hook after machineStart, which had already installed the keyboard file's - so naming a keyboard file and running the window silently got the window, and the flag said nothing about being ignored. Both together is the combination a demo wants. Recording a flight needs the typing that STARTS it to be the same every time, because a human reaching the shell a moment later shifts every frame of the recording after it - while the flying itself has to come from whatever is actually in somebody's hands. So the window only takes the keyboard when no file was named. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW --- Source/Emulator/voyager.c | 17 ++++++++++++++--- demo.pad | Bin 0 -> 2432 bytes 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 demo.pad diff --git a/Source/Emulator/voyager.c b/Source/Emulator/voyager.c index cab12e2..de03b70 100644 --- a/Source/Emulator/voyager.c +++ b/Source/Emulator/voyager.c @@ -487,9 +487,20 @@ int main(int argc, char *argv[]) { screenTexture = LoadTextureFromImage(blank); UnloadImage(blank); windowOpen = 1; - // The keyboard becomes the console's input, in place of a standard input the window - // does not have. - consoleSetInputHook(voyagerKey); + // ---- The keyboard becomes the console's input ---- + // + // In place of a standard input the window does not have. UNLESS A KEYBOARD FILE WAS + // NAMED, which used to be overridden here without a word: machineStart installs the + // file's hook and this replaced it, so --keyboard was a flag that did nothing behind + // a window and said nothing about it. + // + // Both together is the combination a demo wants. Recording a flight needs the typing + // that STARTS it to be the same every time - a human reaching the shell at a slightly + // different moment shifts every frame of the recording after it - while the flying + // itself comes from whatever is actually in somebody's hands. + if (options.keyboard == NULL) { + consoleSetInputHook(voyagerKey); + } // ---- A slice a frame ---- // // The machine gets its turn, then the window gets its turn. Closing the window stops diff --git a/demo.pad b/demo.pad new file mode 100644 index 0000000000000000000000000000000000000000..5da401cc9bd6df51e22fc6c1792930b1a2d05bf6 GIT binary patch literal 2432 vcmZP=6o83|3G5C=Fo}(DfC6lCqhg~WFd71*Aut*OqaiRF0;3@?ltKUi@<##) literal 0 HcmV?d00001