bugfixes
This commit is contained in:
parent
38ea5dba36
commit
665c5b3eea
@ -28,8 +28,15 @@ void TextThread::Flush()
|
|||||||
{
|
{
|
||||||
LOCK(ttMutex);
|
LOCK(ttMutex);
|
||||||
if (buffer.size() < 400 && (GetTickCount() - timestamp < FlushDelay || buffer.size() == 0)) return;
|
if (buffer.size() < 400 && (GetTickCount() - timestamp < FlushDelay || buffer.size() == 0)) return;
|
||||||
if (status & USING_UNICODE) sentence = std::wstring((wchar_t*)buffer.data(), buffer.size() / 2);
|
if (status & USING_UNICODE)
|
||||||
else sentence = ToWString(buffer.data(), status & USING_UTF8 ? CP_UTF8 : SHIFT_JIS);
|
{
|
||||||
|
sentence = std::wstring((wchar_t*)buffer.data(), buffer.size() / 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buffer.push_back(0); // Null terminate
|
||||||
|
sentence = ToWString(buffer.data(), status & USING_UTF8 ? CP_UTF8 : SHIFT_JIS);
|
||||||
|
}
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
}
|
}
|
||||||
AddSentence(sentence);
|
AddSentence(sentence);
|
||||||
|
@ -13,7 +13,7 @@ struct InfoForExtension
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Traverses linked list to find info.
|
// Traverses linked list to find info.
|
||||||
int GetProperty(const char* propertyName, const InfoForExtension* miscInfo)
|
int54_t GetProperty(const char* propertyName, const InfoForExtension* miscInfo)
|
||||||
{
|
{
|
||||||
const InfoForExtension* miscInfoTraverser = miscInfo;
|
const InfoForExtension* miscInfoTraverser = miscInfo;
|
||||||
while (miscInfoTraverser != nullptr)
|
while (miscInfoTraverser != nullptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user