swkbd: basic implementation

This commit is contained in:
citra-swkbd 2017-10-04 09:24:21 -05:00 committed by GitHub
parent 15c7641bef
commit a8e042fd30

View File

@ -14,7 +14,7 @@
#include "core/hle/service/gsp_gpu.h"
#include "core/hle/service/hid/hid.h"
#include "core/memory.h"
using namespace std;
////////////////////////////////////////////////////////////////////////////////////////////////////
namespace HLE {
@ -77,7 +77,10 @@ void SoftwareKeyboard::Update() {
// TODO(Subv): Handle input using the touch events from the HID module
// TODO(Subv): Remove this hardcoded text
std::u16string text = Common::UTF8ToUTF16("Citra");
string input = "Citra";
cout << "Type the text you want to send to the application:";
std::getline(std::cin, input);
std::u16string text = Common::UTF8ToUTF16(input);
memcpy(text_memory->GetPointer(), text.c_str(), text.length() * sizeof(char16_t));
// TODO(Subv): Ask for input and write it to the shared memory