From 3aa9ee49927cd39b1dd7c06eaa1f4851ebf69b08 Mon Sep 17 00:00:00 2001 From: npwoods Date: Fri, 19 Jul 2019 07:47:24 -0400 Subject: Moving paste() from mame_ui_manager class to natural_keyboard class, exposing to LUA --- src/frontend/mame/ui/ui.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/frontend/mame/ui/ui.cpp') diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 62b84281b02..867a7b8bbf8 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -904,27 +904,6 @@ bool mame_ui_manager::can_paste() } -//------------------------------------------------- -// paste - does a paste from the keyboard -//------------------------------------------------- - -void mame_ui_manager::paste() -{ - // retrieve the clipboard text - char *text = osd_get_clipboard_text(); - - // was a result returned? - if (text != nullptr) - { - // post the text - machine().ioport().natkeyboard().post_utf8(text); - - // free the string - free(text); - } -} - - //------------------------------------------------- // draw_fps_counter //------------------------------------------------- @@ -1105,7 +1084,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) { // paste command if (machine().ui_input().pressed(IPT_UI_PASTE)) - paste(); + machine().ioport().natkeyboard().paste(); } image_handler_ingame(); -- cgit v1.2.3-70-g09d2