mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
CPUThread fixes, thread_t cleanup
This commit is contained in:
parent
83321c5be7
commit
eafddd9e33
10 changed files with 69 additions and 83 deletions
|
@ -19,7 +19,7 @@ std::unique_ptr<wchar_t[]> to_wchar(const std::string& source)
|
|||
|
||||
if (!MultiByteToWideChar(CP_UTF8, 0, source.c_str(), size, buffer.get(), size))
|
||||
{
|
||||
throw EXCEPTION("Conversion failed (0x%llx)", GET_API_ERROR);
|
||||
throw EXCEPTION("System error 0x%x", GetLastError());
|
||||
}
|
||||
|
||||
return buffer;
|
||||
|
@ -38,14 +38,14 @@ void to_utf8(std::string& result, const wchar_t* source)
|
|||
|
||||
if (size <= 0)
|
||||
{
|
||||
throw EXCEPTION("Conversion failed (0x%llx)", GET_API_ERROR);
|
||||
throw EXCEPTION("System error 0x%x", GetLastError());
|
||||
}
|
||||
|
||||
result.resize(size);
|
||||
|
||||
if (!WideCharToMultiByte(CP_UTF8, 0, source, length, &result.front(), size, NULL, NULL))
|
||||
{
|
||||
throw EXCEPTION("Conversion failed (0x%llx)", GET_API_ERROR);
|
||||
throw EXCEPTION("System error 0x%x", GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue