Fixed backspacing text input so that it reads the char backspaced correctly.
This commit is contained in:
parent
11132e4949
commit
a1d782b16c
|
|
@ -1053,12 +1053,15 @@ static void _ui_textInputConfirm(char *buf)
|
||||||
|
|
||||||
static void _ui_textInputDel(char *buf)
|
static void _ui_textInputDel(char *buf)
|
||||||
{
|
{
|
||||||
|
// announce the char about to be backspaced.
|
||||||
|
if(buf[ui_state.input_position])
|
||||||
|
vp_announceInputChar(buf[ui_state.input_position]);
|
||||||
|
|
||||||
buf[ui_state.input_position] = '\0';
|
buf[ui_state.input_position] = '\0';
|
||||||
// Move back input cursor
|
// Move back input cursor
|
||||||
if(ui_state.input_position > 0)
|
if(ui_state.input_position > 0)
|
||||||
{
|
{
|
||||||
ui_state.input_position--;
|
ui_state.input_position--;
|
||||||
vp_announceInputChar(buf[ui_state.input_position]);
|
|
||||||
// If we deleted the initial character, reset starting condition
|
// If we deleted the initial character, reset starting condition
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue