From 1d66513caf7e823d69307d79ec0a24014094872b Mon Sep 17 00:00:00 2001 From: ParticleG Date: Thu, 31 Oct 2024 18:55:11 +0800 Subject: [PATCH] - Add log --- Zframework/init.lua | 5 ++++- Zframework/js.lua | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 7a4027c36..c0263227e 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -222,7 +222,6 @@ if JS then print("PASTE") repeat love.timer.sleep(0.2) - JS.retrieveData(0.2) until res return res end @@ -756,6 +755,10 @@ function love.run() local dt=time-lastFrame lastFrame=time + if JS.retrieveData(dt) then + return + end + -- EVENT PUMP() for N,a,b,c,d,e in POLL() do diff --git a/Zframework/js.lua b/Zframework/js.lua index efcdb3d68..db43687d5 100644 --- a/Zframework/js.lua +++ b/Zframework/js.lua @@ -76,6 +76,7 @@ function _Request:new(isPromise, command, onDataLoaded, onError, timeout, id) end self.onDataLoaded(retData) else + print('d', self.id, retData) self.onError(self.id, retData) end self:purgeData()