From 2e09116513ed8aba27a4f616fb7719fecc68b095 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Mon, 16 Oct 2017 10:26:07 +0300 Subject: [PATCH] btn() always returns number #339 --- src/jsapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsapi.c b/src/jsapi.c index 65c9567..7eea49b 100644 --- a/src/jsapi.c +++ b/src/jsapi.c @@ -200,7 +200,7 @@ static duk_ret_t duk_btn(duk_context* duk) else { s32 index = duk_to_int(duk, 0) & 0xf; - duk_push_uint(duk, machine->memory.ram.vram.input.gamepad.data & (1 << index)); + duk_push_boolean(duk, machine->memory.ram.vram.input.gamepad.data & (1 << index)); } return 1;