mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
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.
(cherry picked from commit 6c55fad411)
This commit is contained in:
parent
3d92675bdb
commit
dd21daa681
1 changed files with 2 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue