This commit is contained in:
ParticleG
2024-10-31 21:08:43 +08:00
parent 9ddab37232
commit eb3b8c9e9d

View File

@@ -199,8 +199,8 @@ if JS then
))
end
local _clipboardBuffer=''
love.system.getClipboardText = function ()
local res=''
JS.newPromiseRequest(
JS.stringFunc(
[[
@@ -213,12 +213,12 @@ if JS then
});
]]
),
function(data) res=data end,
function(data) _clipboardBuffer=data end,
function(id, error) print(id, error) end,
3,
'getClipboardText'
)
return res
return _clipboardBuffer
end
end