From ca39c0ddf3dc9873cdc7db853c611445e7885b0f Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Sun, 3 Nov 2024 01:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=AA=E5=88=87=E6=9D=BF=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/clipboard.lua | 8 ++++++-- Zframework/init.lua | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Zframework/clipboard.lua b/Zframework/clipboard.lua index 3014637ca..bfa41060d 100644 --- a/Zframework/clipboard.lua +++ b/Zframework/clipboard.lua @@ -44,10 +44,14 @@ if WEB_COMPAT_MODE then ]] ), function(data) _clipboardBuffer=data end, - function(id,error) print(id, error) end, + function() _clipboardBuffer='' end, 3, 'getClipboardText' ) + if TASK.lock('clipboard_compat_interval',2.6) then + _clipboardBuffer='' + MES.new('warn',"Web-Compat mode, paste again to confirm",2.6) + end return _clipboardBuffer end, set=function(str) @@ -78,7 +82,7 @@ if not isStarted then end local freshInterval=1 -local timer=-5 +local timer=-.626 return { get=function() return getCHN:peek() or '' end, set=function(content) setCHN:push(_sanitize(content)) end, diff --git a/Zframework/init.lua b/Zframework/init.lua index a85d30cce..b3d0ef725 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -14,6 +14,7 @@ LOADED=false Windows ]]-- SYSTEM=love.system.getOS() +WEB_COMPAT_MODE=false if SYSTEM=='OS X' then SYSTEM='macOS' elseif SYSTEM=='Web' then