forked from Public-Mirror/Textractor
bugfixes
This commit is contained in:
parent
38ea5dba36
commit
665c5b3eea
@ -28,8 +28,15 @@ void TextThread::Flush()
|
||||
{
|
||||
LOCK(ttMutex);
|
||||
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);
|
||||
else sentence = ToWString(buffer.data(), status & USING_UTF8 ? CP_UTF8 : SHIFT_JIS);
|
||||
if (status & USING_UNICODE)
|
||||
{
|
||||
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();
|
||||
}
|
||||
AddSentence(sentence);
|
||||
|
@ -13,7 +13,7 @@ struct InfoForExtension
|
||||
};
|
||||
|
||||
// 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;
|
||||
while (miscInfoTraverser != nullptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user