mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Cocoa: Fix duplicate conversion of title string
This commit is contained in:
parent
2551829f75
commit
a875a536b7
@ -967,10 +967,11 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
|||||||
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)
|
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
[window->ns.object setTitle:@(title)];
|
NSString* string = @(title);
|
||||||
|
[window->ns.object setTitle:string];
|
||||||
// HACK: Set the miniwindow title explicitly as setTitle: doesn't update it
|
// HACK: Set the miniwindow title explicitly as setTitle: doesn't update it
|
||||||
// if the window lacks NSWindowStyleMaskTitled
|
// if the window lacks NSWindowStyleMaskTitled
|
||||||
[window->ns.object setMiniwindowTitle:@(title)];
|
[window->ns.object setMiniwindowTitle:string];
|
||||||
} // autoreleasepool
|
} // autoreleasepool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user