Windows Audio and MIDI feature sync

This commit is contained in:
Jack Andersen
2018-08-19 10:06:29 -10:00
parent 168fb3f516
commit f73e4f08fa
2 changed files with 104 additions and 23 deletions

View File

@@ -125,4 +125,12 @@ static inline std::string WCSTMBS(const wchar_t* wstr)
return strTo;
}
static inline std::wstring MBSTWCS(const char* str)
{
int sizeNeeded = MultiByteToWideChar(CP_UTF8, 0, str, -1, nullptr, 0) - 1;
std::wstring strTo(sizeNeeded, 0);
MultiByteToWideChar(CP_UTF8, 0, str, -1, &strTo[0], sizeNeeded);
return strTo;
}
#endif // BOO_WINCOMMON_HPP