From 6c55fad411cbaa24ae4f488b4e349a21a3699b5c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sat, 23 May 2026 23:56:48 -0400
Subject: [PATCH] examples/demo/04-bytepusher: go back to showing help text on
load failures.
If the VM was already running, and then a file failed to open at all (a
directory was dropped on the window, etc), this wouldn't go back to showing
the help text.
---
examples/demo/04-bytepusher/bytepusher.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/demo/04-bytepusher/bytepusher.c b/examples/demo/04-bytepusher/bytepusher.c
index 6911956222296..25525735bf18d 100644
--- a/examples/demo/04-bytepusher/bytepusher.c
+++ b/examples/demo/04-bytepusher/bytepusher.c
@@ -74,6 +74,8 @@ static bool load(BytePusher* vm, SDL_IOStream* stream, bool closeio) {
size_t bytes_read = 0;
bool ok = true;
+ vm->display_help = true; // will set to false if load succeeds.
+
SDL_memset(vm->ram, 0, RAM_SIZE);
if (!stream) {