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 end
local _clipboardBuffer=''
love.system.getClipboardText = function () love.system.getClipboardText = function ()
local res=''
JS.newPromiseRequest( JS.newPromiseRequest(
JS.stringFunc( 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, function(id, error) print(id, error) end,
3, 3,
'getClipboardText' 'getClipboardText'
) )
return res return _clipboardBuffer
end end
end end