in_sdl.c: SDL2: skip over UTF-8 multibyte characters.

Before, we stopped processing at the first byte of a multibyte character, now we skip over the bytes of a multibyte character and continue. This will probably not have a noticeable effect, but it's arguably more correct.


git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1040 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2014-09-20 17:46:23 +00:00
parent d2341d3bbc
commit 08a0fd713d
1 changed files with 3 additions and 2 deletions

View File

@ -530,8 +530,9 @@ void IN_SendKeyEvents (void)
if (!Key_ConsoleBindable(lastKeyDown))
{
unsigned char *ch;
for (ch = (unsigned char *)event.text.text; ch[0] != 0 && ch[0] < 128; ch++)
Char_Event (ch[0]);
for (ch = (unsigned char *)event.text.text; ch[0] != 0; ch++)
if ((ch[0] & 0x80) == 0)
Char_Event (ch[0]);
}
break;
#endif