aboutsummaryrefslogtreecommitdiff
path: root/emcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'emcc.c')
-rw-r--r--emcc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/emcc.c b/emcc.c
index eedfc35..31aedbd 100644
--- a/emcc.c
+++ b/emcc.c
@@ -987,7 +987,6 @@ int main(int argc, char **argv)
*/
{
struct preset_menu *menu = midend_get_presets(me, &npresets);
- char *env;
bool may_configure = false;
presets = snewn(npresets, game_params *);
for (i = 0; i < npresets; i++)
@@ -999,10 +998,7 @@ int main(int argc, char **argv)
* Crude hack to allow the "Custom..." item to be hidden on
* KaiOS, where dialogs don't yet work.
*/
- env = getenv("PUZZLES_ALLOW_CUSTOM");
-
- if (thegame.can_configure &&
- (!env || env[0] == 'y' || env[0] == 'Y'))
+ if (thegame.can_configure && getenv_bool("PUZZLES_ALLOW_CUSTOM", true))
may_configure = true;
if (may_configure)
js_add_preset(0, "Custom...", -1);