From fe91a55a881f602bd1d2b51547e0cc758b6b03e3 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 3 Jan 2020 00:00:34 +0000 Subject: [PATCH] Save/restore ctrl-key handler and sys_status correctly --- xtrn/bublbogl/game.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xtrn/bublbogl/game.js b/xtrn/bublbogl/game.js index 0b4c92d0a1..99dfc05dc9 100644 --- a/xtrn/bublbogl/game.js +++ b/xtrn/bublbogl/game.js @@ -10,7 +10,6 @@ Matt Johnson ( MCMLXXIX@BBS.THEBROKENBUBBLE.COM ) */ -var oldpass=console.ctrl_key_passthru; var game_id = "boggle"; load("graphic.js"); @@ -514,7 +513,9 @@ function open() { client.subscribe(game_id,"players"); data.players[useralias].laston = time(); data.storePlayer(); + js.on_exit("console.ctrlkey_passthru = " + console.ctrlkey_passthru); console.ctrlkey_passthru="+ACGKLOPQRTUVWXYZ"; + js.on_exit("bbs.sys_status = " + bbs.sys_status); bbs.sys_status|=SS_MOFF; bbs.sys_status |= SS_PAUSEOFF; if(file_exists(root + "boggle.bin")) { @@ -531,9 +532,6 @@ function open() { function close() { client.unsubscribe(game_id,"players"); - console.ctrlkey_passthru=oldpass; - bbs.sys_status&=~SS_MOFF; - bbs.sys_status&=~SS_PAUSEOFF; console.attributes=ANSI_NORMAL; console.clear(); var splash_filename=root + "exit.bin"; -- GitLab