From d40b887775893251fd3283bd233815d0a56919e6 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Mon, 6 Oct 2025 18:32:27 +0100 Subject: [PATCH] Support loading BytePusher files from the command line --- examples/demo/04-bytepusher/bytepusher.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/demo/04-bytepusher/bytepusher.c b/examples/demo/04-bytepusher/bytepusher.c index b661217afa..e5c4e5c382 100644 --- a/examples/demo/04-bytepusher/bytepusher.c +++ b/examples/demo/04-bytepusher/bytepusher.c @@ -136,8 +136,6 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[]) { int zoom = 2; int i; Uint8 r, g, b; - (void)argc; - (void)argv; if (!SDL_SetAppMetadata("SDL 3 BytePusher", "1.0", "com.example.SDL3BytePusher")) { return SDL_APP_FAILURE; @@ -222,6 +220,10 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[]) { vm->last_tick = SDL_GetTicksNS(); vm->tick_acc = NS_PER_SECOND; + if (argc > 1) { + load_file(vm, argv[1]); + } + return SDL_APP_CONTINUE; }