diff options
| author | bunnei <bunneidev@gmail.com> | 2018-11-20 08:24:11 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-20 08:24:11 -0800 |
| commit | b6d2c64f4dcb01f1ffc99f9a057910ec65c6a401 (patch) | |
| tree | b75fde22327ac851821d58078614e62cc1c29916 /src/core/frontend/applets/software_keyboard.cpp | |
| parent | e9265ac598d65a41e5d62103e48b7786e7cd64d6 (diff) | |
| parent | a9fa890f14afc84307884aa802b6255c906054d9 (diff) | |
Merge pull request #1667 from DarkLordZach/swkbd
am: Implement HLE software keyboard applet
Diffstat (limited to 'src/core/frontend/applets/software_keyboard.cpp')
| -rw-r--r-- | src/core/frontend/applets/software_keyboard.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/frontend/applets/software_keyboard.cpp b/src/core/frontend/applets/software_keyboard.cpp new file mode 100644 index 000000000..856ed33da --- /dev/null +++ b/src/core/frontend/applets/software_keyboard.cpp @@ -0,0 +1,29 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "common/logging/backend.h" +#include "common/string_util.h" +#include "core/frontend/applets/software_keyboard.h" + +namespace Core::Frontend { +SoftwareKeyboardApplet::~SoftwareKeyboardApplet() = default; + +void DefaultSoftwareKeyboardApplet::RequestText( + std::function<void(std::optional<std::u16string>)> out, + SoftwareKeyboardParameters parameters) const { + if (parameters.initial_text.empty()) + out(u"yuzu"); + + out(parameters.initial_text); +} + +void DefaultSoftwareKeyboardApplet::SendTextCheckDialog( + std::u16string error_message, std::function<void()> finished_check) const { + LOG_WARNING(Service_AM, + "(STUBBED) called - Default fallback software keyboard does not support text " + "check! (error_message={})", + Common::UTF16ToUTF8(error_message)); + finished_check(); +} +} // namespace Core::Frontend |
