From 014bef9eab9fb409cfb3ec66830e033e4aaa29a9 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Thu, 19 Sep 2019 22:20:08 +0100 Subject: BACKENDS: Add a default clipboard implementation --- gui/console.cpp | 4 ++-- gui/widgets/editable.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/console.cpp b/gui/console.cpp index 79df413534..a47f5b9afd 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -523,7 +523,7 @@ void ConsoleDialog::specialKeys(Common::KeyCode keycode) { g_gui.scheduleTopDialogRedraw(); break; case Common::KEYCODE_v: - if (g_system->hasFeature(OSystem::kFeatureClipboardSupport) && g_system->hasTextInClipboard()) { + if (g_system->hasTextInClipboard()) { Common::String text = g_system->getTextFromClipboard(); insertIntoPrompt(text.c_str()); scrollToCurrent(); @@ -531,7 +531,7 @@ void ConsoleDialog::specialKeys(Common::KeyCode keycode) { } break; case Common::KEYCODE_c: - if (g_system->hasFeature(OSystem::kFeatureClipboardSupport)) { + { Common::String userInput = getUserInput(); if (!userInput.empty()) g_system->setTextInClipboard(userInput); diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp index 2af078f9f6..048a0b0fcd 100644 --- a/gui/widgets/editable.cpp +++ b/gui/widgets/editable.cpp @@ -186,7 +186,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { break; case Common::KEYCODE_v: - if (g_system->hasFeature(OSystem::kFeatureClipboardSupport) && state.flags & Common::KBD_CTRL) { + if (state.flags & Common::KBD_CTRL) { if (g_system->hasTextInClipboard()) { String text = g_system->getTextFromClipboard(); for (uint32 i = 0; i < text.size(); ++i) { @@ -201,7 +201,7 @@ bool EditableWidget::handleKeyDown(Common::KeyState state) { break; case Common::KEYCODE_c: - if (g_system->hasFeature(OSystem::kFeatureClipboardSupport) && state.flags & Common::KBD_CTRL) { + if (state.flags & Common::KBD_CTRL) { if (!getEditString().empty()) g_system->setTextInClipboard(getEditString()); } else { -- cgit v1.2.3