aboutsummaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2026-10-29 00:45:24 +0100
committerNicholas Rodrigues Lordello <[email protected]>2026-10-29 00:45:24 +0100
commitec6ed6404cdc29fc204eb93fdeb5025deb42f49d (patch)
tree65dc21b389bc716163d9c0ba9a3e5f88ce883d69 /src/env.h
parent05a5c587f6c59aee26038cc4bdf657d9040340e3 (diff)
Support the Shutdown Option
It looks like the `SHUTDOWN` menu option shows up when the `-run` CLI argument is passed, so pass it. There is a catch though, in that PICO-8 does not properly report shutdown requests in those cases, so read Wasm memory directly to detect the shutdown request.
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index 2b36773..bfe96ba 100644
--- a/src/env.h
+++ b/src/env.h
@@ -90,4 +90,9 @@ void pw_env_free(struct w2c_env *env);
*/
bool pw_env_link(struct w2c_env *env, struct pw_env_ctx context);
+/**
+ * Returns whether or not a shutdown is requested.
+ */
+bool pw_env_shutdown(struct w2c_env *env);
+
#endif