Fix Clipboard for renderer build, ensure MacOS and Windows clipboard funcs return std::string
This commit is contained in:
parent
5b67c8ce68
commit
197a70c2e6
@ -18,8 +18,8 @@
|
||||
|
||||
|
||||
void EngineProcess() {}
|
||||
void ClipboardPush(char * text) {}
|
||||
char * ClipboardPull() {}
|
||||
void ClipboardPush(std::string) {}
|
||||
std::string ClipboardPull() {}
|
||||
int GetModifiers() { return 0; }
|
||||
|
||||
void readFile(std::string filename, std::vector<char> & storage)
|
||||
|
@ -103,7 +103,7 @@ std::string ClipboardPull()
|
||||
{
|
||||
#ifdef MACOSX
|
||||
const char *text = readClipboard();
|
||||
return text ? text : "";
|
||||
return text ? std::string(text) : "";
|
||||
#elif defined(WIN)
|
||||
if (OpenClipboard(NULL))
|
||||
{
|
||||
@ -114,7 +114,7 @@ std::string ClipboardPull()
|
||||
glbuffer = (char*)GlobalLock(cbuffer);
|
||||
GlobalUnlock(cbuffer);
|
||||
CloseClipboard();
|
||||
return glbuffer ? glbuffer : "";
|
||||
return glbuffer ? std::string(glbuffer) : "";
|
||||
}
|
||||
#elif defined(LIN) && defined(SDL_VIDEO_DRIVER_X11)
|
||||
std::string text = "";
|
||||
|
Loading…
Reference in New Issue
Block a user