mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 08:58:00 -05:00
frontend/applets: Add frontend software keyboard provider and default
Default implementation will return "yuzu" for any string. GUI clients (or CLI) can implement the Frontend::SoftwareKeyboardApplet class and register an instance to provide functionality.
This commit is contained in:
17
src/core/frontend/applets/software_keyboard.cpp
Normal file
17
src/core/frontend/applets/software_keyboard.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
// 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 "core/frontend/applets/software_keyboard.h"
|
||||
|
||||
namespace Frontend {
|
||||
bool DefaultSoftwareKeyboardApplet::GetText(Parameters parameters, std::u16string& text) {
|
||||
if (parameters.initial_text.empty())
|
||||
text = Common::UTF8ToUTF16("yuzu");
|
||||
else
|
||||
text = parameters.initial_text;
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace Frontend
|
Reference in New Issue
Block a user