diff --git a/src/PowderToyRenderer.cpp b/src/PowderToyRenderer.cpp index 9207ab637..5644f766f 100644 --- a/src/PowderToyRenderer.cpp +++ b/src/PowderToyRenderer.cpp @@ -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 & storage) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 209b6a32f..88a680168 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -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 = "";