summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
authorGravatarGravatar npwoods <npwoods@mess.org>2019-09-11 14:16:02 -0400
committerGravatarGravatar R. Belmont <rb6502@users.noreply.github.com>2019-09-11 14:16:02 -0400
commitbc15184c90a7eaf4cf16ea060916346e390a7c3b (patch)
treebdf475c68602c37cba55338702343f572bbed6ee /src/frontend
parent4f8928432a9db8cd46cfd5c6e2cb262eafaed9d2 (diff)
Changed osd_get_clipboard_text() to return std::string (#5615)
* Changed osd_get_clipboard_text() to return std::string This change has only been tested on Windows. The Un*x/Mac versions were made blindly; they might not even build. This needs to be checked prior to merging. * Fixing Mac OS X build (hopefully)
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/ui/ui.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 4269e674f84..27987bbc9c9 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -917,15 +917,8 @@ void mame_ui_manager::decrease_frameskip()
bool mame_ui_manager::can_paste()
{
- // retrieve the clipboard text
- char *text = osd_get_clipboard_text();
-
- // free the string if allocated
- if (text != nullptr)
- free(text);
-
- // did we have text?
- return text != nullptr;
+ // check to see if the clipboard is not empty
+ return !osd_get_clipboard_text().empty();
}