This commit is contained in:
skymz4 2022-04-23 14:46:07 +02:00 committed by GitHub
parent 04741198e2
commit fa948a7beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1162,8 +1162,11 @@ std::string Kbd(int lenght, SwkbdType tp)
RenderD7::FrameEnd(); RenderD7::FrameEnd();
SwkbdState state; SwkbdState state;
char temp[lenght + 1] = { 0 }; char temp[lenght + 1] = { 0 };
swkbdInit(&state, SwkbdType::SWKBD_TYPE_NUMPAD, 2, lenght); swkbdInit(&state, SwkbdType::SWKBD_TYPE_NUMPAD, 2, lenght);
swkbdSetValidation(&state, SWKBD_NOTBLANK_NOTEMPTY, SWKBD_FILTER_PROFANITY, 0);
SwkbdButton ret = swkbdInputText(&state, temp, sizeof(temp)); SwkbdButton ret = swkbdInputText(&state, temp, sizeof(temp));
temp[maxLength] = '\0';
return (ret == SWKBD_BUTTON_CONFIRM ? temp : "60"); return (ret == SWKBD_BUTTON_CONFIRM ? temp : "60");
} }
void RenderD7::RSettings::Logic(u32 hDown, u32 hHeld, u32 hUp, touchPosition touch) void RenderD7::RSettings::Logic(u32 hDown, u32 hHeld, u32 hUp, touchPosition touch)