diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 6651e37318..4ff7c6af37 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -36,8 +36,8 @@ #include #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)); diff --git a/Core/Dialog/PSPOskDialog.h b/Core/Dialog/PSPOskDialog.h index 8acacbe72b..b6971c96d6 100644 --- a/Core/Dialog/PSPOskDialog.h +++ b/Core/Dialog/PSPOskDialog.h @@ -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 };