From 394c658d8b5b839aba53e86e0fabddf76d6913f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Reuh=20Fildadut?= Date: Thu, 18 Feb 2021 17:14:29 +0100 Subject: [PATCH] Dt in seconds, minor fixes --- input/input.lua | 1 + signal/backend/love.lua | 4 ++-- util/util.lua | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/input/input.lua b/input/input.lua index df840a3..ad84a96 100644 --- a/input/input.lua +++ b/input/input.lua @@ -164,6 +164,7 @@ local axis_mt = { clone = function(self) return input.axis(unpack(self.detectors)) :threshold(self.threshold) + :triggeringThreshold(self.triggeringThreshold) end, --- Bind new AxisDetector(s) to this input. diff --git a/signal/backend/love.lua b/signal/backend/love.lua index b93570c..87045d3 100644 --- a/signal/backend/love.lua +++ b/signal/backend/love.lua @@ -17,11 +17,11 @@ function signal.registerEvents() local old = love[callback] love[callback] = function(dt) old(dt) - event:emit(callback, dt*1000) + event:emit(callback, dt) end else love[callback] = function(dt) - event:emit(callback, dt*1000) + event:emit(callback, dt) end end else diff --git a/util/util.lua b/util/util.lua index 5fe5a4f..35ee1ca 100644 --- a/util/util.lua +++ b/util/util.lua @@ -140,6 +140,7 @@ util = { --- Perform a deep copy of a table. -- The copied table will keep the share the same metatable as the original table. + -- If a key is a table, it will be reused and not copied. -- Note this uses pairs() to perform the copy, which will honor the __pairs methamethod if present. -- @tparam table t the table -- @treturn table the copied table