mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Return nil if clipboard does not contain any text
This commit is contained in:
parent
ac9081cf89
commit
001ce2f626
1 changed files with 5 additions and 2 deletions
|
@ -130,7 +130,10 @@ public class Machine : IComponent
|
|||
{
|
||||
var L = Lua.FromIntPtr(state);
|
||||
|
||||
L.PushString(SDL.GetClipboardText());
|
||||
if (SDL.HasClipboardText())
|
||||
L.PushString(SDL.GetClipboardText());
|
||||
else
|
||||
L.PushNil();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue