From 95283b6fc72d6c08b864af55b7f267b28d039d4a Mon Sep 17 00:00:00 2001 From: ParticleG Date: Thu, 31 Oct 2024 10:40:09 +0800 Subject: [PATCH] - Update init.lua --- Zframework/init.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 6b082467..d827b628 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -93,7 +93,7 @@ SFX= require'Zframework.sfx' IMG= require'Zframework.image' BGM= require'Zframework.bgm' VOC= require'Zframework.voice' -JS= require'Zframework.js' +JS= SYSTEM == 'Web' and require'Zframework.js' or NULL local ms,kb=love.mouse,love.keyboard local KBisDown=kb.isDown @@ -176,12 +176,14 @@ local function updatePowerInfo() gc.setCanvas() end -JS.callJS(JS.stringFunc( - [[ - console.log("Love.js Api Player initialized: Techmino %s"); - ]], - VERSION.string -)) +if JS then + JS.callJS(JS.stringFunc( + [[ + console.log("Love.js Api Player initialized: Techmino %s"); + ]], + VERSION.string + )) +end ------------------------------------------------------------- local lastX,lastY=0,0-- Last click pos