From e131cc807b884b69f4512d1be6b223cfefd3a8ae Mon Sep 17 00:00:00 2001 From: Tijn Kersjes Date: Sat, 17 Jun 2023 01:14:14 +0200 Subject: [PATCH] Improve emulator compatibility for input lib Enable VBLANK interrupts to prevent KEY getting stuck in the HALT instruction on some emulators, because support for the HILO interrupt is often unreliable. --- lib/input.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/input.fs b/lib/input.fs index 4e5535f2..ee49d174 100644 --- a/lib/input.fs +++ b/lib/input.fs @@ -48,4 +48,5 @@ PADF_DOWN constant k-down rIE c@ or rIE c! ; : init-input ( -- ) - IEF_HILO enable-interrupt-flags ; + IEF_HILO IEF_VBLANK or + enable-interrupt-flags ;