mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-23 11:19:03 +02:00
Merge pull request #3920 from thedax/oskAddFWLatin
OSK: Add full-width Latin keyboard(upper/lower) for compatibility with games that need it.
This commit is contained in:
commit
14aa0c6ffa
2 files changed
+20
-8
No files matched your search
@@ -36,8 +36,8 @@
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
const int numKeyCols[OSK_KEYBOARD_COUNT] = {12, 12, 13, 13, 12, 12, 12};
|
||||
const int numKeyRows[OSK_KEYBOARD_COUNT] = {4, 4, 5, 5, 5, 4, 4};
|
||||
const int numKeyCols[OSK_KEYBOARD_COUNT] = {12, 12, 13, 13, 12, 12, 12, 12, 12};
|
||||
const int numKeyRows[OSK_KEYBOARD_COUNT] = {4, 4, 5, 5, 5, 4, 4, 4, 4};
|
||||
|
||||
// Japanese(Kana) diacritics
|
||||
static const wchar_t diacritics[2][103] =
|
||||
@@ -118,6 +118,20 @@ static const wchar_t oskKeys[OSK_KEYBOARD_COUNT][5][14] =
|
||||
{L"ФЫВАПРОЛДЖЭЁ"},
|
||||
{L"ЯЧСМИТЬБЮ/?|"},
|
||||
},
|
||||
{
|
||||
// Latin Full-width Lowercase
|
||||
{ L"1234567890-+" },
|
||||
{ L"qwertyuiop[]" },
|
||||
{ L"asdfghjkl;@~" },
|
||||
{ L"zxcvbnm,./?¥¥" },
|
||||
},
|
||||
{
|
||||
// Latin Full-width Uppercase
|
||||
{ L"!@#$%^&*()_+" },
|
||||
{ L"QWERTYUIOP{}" },
|
||||
{ L"ASDFGHJKL:¥”‘" },
|
||||
{ L"ZXCVBNM<>/?|" },
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -588,7 +602,7 @@ std::wstring PSPOskDialog::CombinationString(bool isInput)
|
||||
string += inputChars[i];
|
||||
}
|
||||
|
||||
if (string.size() < FieldMaxLength())
|
||||
if (string.size() <= FieldMaxLength())
|
||||
{
|
||||
string += oskKeys[currentKeyboard][selectedRow][selectedCol];
|
||||
}
|
||||
@@ -671,7 +685,7 @@ int PSPOskDialog::GetIndex(const wchar_t* src, wchar_t ch)
|
||||
|
||||
u32 PSPOskDialog::FieldMaxLength()
|
||||
{
|
||||
if (oskParams->fields[0].outtextlimit > oskParams->fields[0].outtextlength - 1 || oskParams->fields[0].outtextlimit == 0)
|
||||
if ((oskParams->fields[0].outtextlimit > oskParams->fields[0].outtextlength - 1) || oskParams->fields[0].outtextlimit == 0)
|
||||
return oskParams->fields[0].outtextlength - 1;
|
||||
return oskParams->fields[0].outtextlimit;
|
||||
}
|
||||
@@ -838,8 +852,6 @@ int PSPOskDialog::Update()
|
||||
return NativeKeyboard();
|
||||
#endif
|
||||
|
||||
u32 limit = FieldMaxLength();
|
||||
|
||||
if (status == SCE_UTILITY_STATUS_INITIALIZE)
|
||||
{
|
||||
status = SCE_UTILITY_STATUS_RUNNING;
|
||||
@@ -861,8 +873,6 @@ int PSPOskDialog::Update()
|
||||
PPGeDrawImage(I_CIRCLE, 30, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
PPGeDrawImage(I_CROSS, 150, 220, 20, 20, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
}
|
||||
//PPGeDrawImage(I_BUTTON, 230, 220, 50, 20, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
//PPGeDrawImage(I_BUTTON, 350, 220, 55, 20, 0, CalcFadedColor(0xFFFFFFFF));
|
||||
|
||||
I18NCategory *d = GetI18NCategory("Dialog");
|
||||
PPGeDrawText(d->T("Select"), 60, 220, PPGE_ALIGN_LEFT, 0.5f, CalcFadedColor(0xFFFFFFFF));
|
||||
|
||||
@@ -158,6 +158,8 @@ enum OskKeyboardDisplay
|
||||
OSK_KEYBOARD_KOREAN,
|
||||
OSK_KEYBOARD_RUSSIAN_LOWERCASE,
|
||||
OSK_KEYBOARD_RUSSIAN_UPPERCASE,
|
||||
OSK_KEYBOARD_LATIN_FW_LOWERCASE,
|
||||
OSK_KEYBOARD_LATIN_FW_UPPERCASE,
|
||||
// TODO: Something to do native?
|
||||
OSK_KEYBOARD_COUNT
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user