剪切板相关微调

This commit is contained in:
MrZ_26
2024-11-03 01:43:31 +08:00
parent 6e6e1034b4
commit ca39c0ddf3
2 changed files with 7 additions and 2 deletions

View File

@@ -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,

View File

@@ -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