[App] Build title using StringBuffer.
This commit is contained in:
@@ -199,11 +199,12 @@ void Win32Window::DisableMainMenu() {
|
||||
}
|
||||
}
|
||||
|
||||
bool Win32Window::set_title(const std::string& title) {
|
||||
bool Win32Window::set_title(const std::string_view title) {
|
||||
if (!super::set_title(title)) {
|
||||
return false;
|
||||
}
|
||||
SetWindowTextW(hwnd_, reinterpret_cast<LPCWSTR>(xe::to_utf16(title).c_str()));
|
||||
auto wide_title = xe::to_utf16(title);
|
||||
SetWindowTextW(hwnd_, reinterpret_cast<LPCWSTR>(wide_title.c_str()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user