Fix: Replace back_inserter usage.
parent
8171e041fa
commit
5082c940d0
|
@ -622,9 +622,12 @@ BOOL CreateGLWindow(const char* title, int width, int height, int bits, bool ful
|
||||||
|
|
||||||
AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle); // Adjust Window To True Requested Size
|
AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle); // Adjust Window To True Requested Size
|
||||||
|
|
||||||
const std::string message = title;
|
const size_t len = std::strlen(title) + 1;
|
||||||
std::wstring targetMessage;
|
wchar_t *tmp = new wchar_t[len];
|
||||||
utf8::utf8to16(message.c_str(), message.c_str() + message.size(), back_inserter(targetMessage));
|
memset(tmp, L'\0', sizeof(wchar_t) * len);
|
||||||
|
utf8::utf8to16(title, title+len, tmp);
|
||||||
|
std::wstring targetMessage = tmp;
|
||||||
|
delete[] tmp;
|
||||||
|
|
||||||
if (nullptr == (g_hWnd = CreateWindowEx(dwExStyle, // Extended Style For The Window
|
if (nullptr == (g_hWnd = CreateWindowEx(dwExStyle, // Extended Style For The Window
|
||||||
TEXT("OpenGL"), // Class Name
|
TEXT("OpenGL"), // Class Name
|
||||||
|
|
Loading…
Reference in New Issue