Files
LibretroAdmin 22ba917922 libretro-common: word_wrap_offset(), with a test
menu_wrap_offset(), which finds where a byte of a string landed in its
word_wrap() or word_wrap_wideglyph() wrap, moves to stdstring.c beside
them as word_wrap_offset(), and MaterialUI and XMB call it from there.

It gave a glyph the wide-glyph wrap had put a line end before the
offset of that line end, so the input dialog's caret sat at the end
of the line above; it now gives the glyph's own.

word_wrap_offset_test wraps plain, wide-glyph and mixed text at every
width from 1 to 39, with line ends left or made NUL as the drivers
make them, and checks that every character lands on itself or on the
line end its space or newline became, in order, that the end lands
on the end, that no wrap more than doubles its text, and that the
caret before a word moved to the next line is on that line. It found
the wrong offset and the wide-glyph wrap's runaway at narrow widths.
2026-11-16 11:49:11 +01:00
..