Skip to content

Commit

Permalink
剪切板相关微调
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 2, 2024
1 parent 6e6e103 commit ca39c0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Zframework/clipboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions Zframework/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca39c0d

Please sign in to comment.