Updated to OVR 0.4.3. Added support for event char to read keyboard text input.

This commit is contained in:
Branimir Karadžić
2014-11-08 20:57:47 -08:00
parent ace930ebd9
commit 31efb2991f
13 changed files with 146 additions and 25 deletions

View File

@@ -236,7 +236,13 @@ void TextBuffer::appendText(FontHandle _fontHandle, const char* _string, const c
CodePoint codepoint = 0;
uint32_t state = 0;
for (; *_string && _string<_end ; ++_string)
if (_end == NULL)
{
_end = _string + strlen(_string);
}
BX_CHECK(_end >= _string);
for (; *_string && _string < _end ; ++_string)
{
if (utf8_decode(&state, (uint32_t*)&codepoint, *_string) == UTF8_ACCEPT )
{
@@ -260,7 +266,7 @@ void TextBuffer::appendText(FontHandle _fontHandle, const wchar_t* _string, cons
if (_end == NULL)
{
_end = _string + (uint32_t) wcslen(_string);
_end = _string + wcslen(_string);
}
BX_CHECK(_end >= _string);