mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-20 00:41:07 +00:00
Address feedback
This commit is contained in:
parent
5a1fa60087
commit
5362e675c4
@ -357,12 +357,16 @@ bool MainUI::event(QEvent *e)
|
||||
case QEvent::KeyPress:
|
||||
{
|
||||
auto qtKeycode = ((QKeyEvent*)e)->key();
|
||||
int nativeKeycode = KeyMapRawQttoNative.find(qtKeycode)->second;
|
||||
NativeKey(KeyInput(DEVICE_ID_KEYBOARD, nativeKeycode, KEY_DOWN));
|
||||
auto iter = KeyMapRawQttoNative.find(qtKeycode);
|
||||
int nativeKeycode = 0;
|
||||
if (iter != KeyMapRawQttoNative.end()) {
|
||||
nativeKeycode = iter->second;
|
||||
NativeKey(KeyInput(DEVICE_ID_KEYBOARD, nativeKeycode, KEY_DOWN));
|
||||
}
|
||||
|
||||
// Also get the unicode value.
|
||||
QString text = ((QKeyEvent*)e)->text();
|
||||
std::string str = text.toStdString();
|
||||
|
||||
// Now, we don't want CHAR events for non-printable characters. Not quite sure how we'll best
|
||||
// do that, but here's one attempt....
|
||||
switch (nativeKeycode) {
|
||||
|
@ -803,8 +803,6 @@ void GameSettingsScreen::CreateViews() {
|
||||
// so until then, this is Windows/Desktop only.
|
||||
#if !defined(MOBILE_DEVICE) // TODO: Add all platforms where KEY_CHAR support is added
|
||||
systemSettings->Add(new PopupTextInputChoice(&g_Config.sNickName, sy->T("Change Nickname"), "", 32, screenManager()));
|
||||
// #elif defined(USING_QT_UI)
|
||||
// systemSettings->Add(new Choice(sy->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname);
|
||||
#elif defined(__ANDROID__)
|
||||
systemSettings->Add(new ChoiceWithValueDisplay(&g_Config.sNickName, sy->T("Change Nickname"), (const char *)nullptr))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user