Fix using Emoji in Windows window titles

This commit is contained in:
Chris Thrasher 2025-02-19 09:43:47 -07:00
parent 601b5032e7
commit 767ffbe636

View File

@ -213,7 +213,7 @@ m_cursorGrabbed(m_fullscreen)
// Create the window // Create the window
m_handle = CreateWindowW(className, m_handle = CreateWindowW(className,
title.toWideString().c_str(), reinterpret_cast<const wchar_t*>(title.toUtf16().c_str()),
win32Style, win32Style,
left, left,
top, top,
@ -358,7 +358,7 @@ void WindowImplWin32::setSize(Vector2u size)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void WindowImplWin32::setTitle(const String& title) void WindowImplWin32::setTitle(const String& title)
{ {
SetWindowTextW(m_handle, title.toWideString().c_str()); SetWindowTextW(m_handle, reinterpret_cast<const wchar_t*>(title.toUtf16().c_str()));
} }