2018-11-10 01:10:58 +00:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include "common/logging/backend.h"
|
2018-11-11 21:57:59 +00:00
|
|
|
#include "common/string_util.h"
|
2018-11-10 01:10:58 +00:00
|
|
|
#include "core/frontend/applets/software_keyboard.h"
|
|
|
|
|
2018-11-11 21:39:25 +00:00
|
|
|
namespace Core::Frontend {
|
|
|
|
SoftwareKeyboardApplet::~SoftwareKeyboardApplet() = default;
|
|
|
|
|
2018-11-12 16:08:09 +00:00
|
|
|
void DefaultSoftwareKeyboardApplet::RequestText(
|
|
|
|
std::function<void(std::optional<std::u16string>)> out,
|
2018-11-12 01:16:38 +00:00
|
|
|
SoftwareKeyboardParameters parameters) const {
|
2018-11-10 01:10:58 +00:00
|
|
|
if (parameters.initial_text.empty())
|
2018-11-12 16:08:09 +00:00
|
|
|
out(u"yuzu");
|
2018-11-10 01:10:58 +00:00
|
|
|
|
2018-11-12 16:08:09 +00:00
|
|
|
out(parameters.initial_text);
|
2018-11-10 01:10:58 +00:00
|
|
|
}
|
2018-11-11 21:39:25 +00:00
|
|
|
|
2018-11-17 17:18:03 +00:00
|
|
|
void DefaultSoftwareKeyboardApplet::SendTextCheckDialog(
|
|
|
|
std::u16string error_message, std::function<void()> finished_check) const {
|
2018-11-11 21:41:31 +00:00
|
|
|
LOG_WARNING(Service_AM,
|
|
|
|
"(STUBBED) called - Default fallback software keyboard does not support text "
|
|
|
|
"check! (error_message={})",
|
|
|
|
Common::UTF16ToUTF8(error_message));
|
2018-11-17 17:18:03 +00:00
|
|
|
finished_check();
|
2018-11-11 21:41:31 +00:00
|
|
|
}
|
2018-11-11 21:39:25 +00:00
|
|
|
} // namespace Core::Frontend
|