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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1040 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2014-09-20 17:46:23 +00:00
parent cb0c84ac9d
commit 8ad4f6b437

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