global: add TAISEI_KIOSK_PREVENT_QUIT env var

Defaults to 1. Set to 0 to be able to close the window in kiosk mode.
This is intended for testing and not recommended for deployment.
This commit is contained in:
Andrei Alexeyev 2024-05-04 12:47:48 +02:00 committed by Andrei Alexeyev
parent 858398f556
commit 85f74eb4bf
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -50,7 +50,7 @@ bool gamekeypressed(KeyIndex key) {
static SDL_atomic_t quitting;
void taisei_quit(void) {
if(global.is_kiosk_mode) {
if(global.is_kiosk_mode && env_get("TAISEI_KIOSK_PREVENT_QUIT", true)) {
log_info("Running in kiosk mode; exit request ignored");
return;
}