From 89016020a8e518c82ded49f6e82c3ca877d3b86d Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 29 May 2016 10:43:21 +0300 Subject: [PATCH] Used ISO Latin 1 encoding for title text in startup window on OS X Windows version uses ANSI_CHARSET to handle the corresponding text This solves the problem like in https://github.com/alexey-lysiuk/gzdoom/issues/63: *** Assertion failure in -[NSTextFieldCell _objectValue:forString:errorDescription:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1404.47/AppKit.subproj/NSCell.m:1684 Invalid parameter not satisfying: aString != nil --- src/posix/cocoa/st_console.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/posix/cocoa/st_console.mm b/src/posix/cocoa/st_console.mm index 5d82551bc1..e38a5cc85c 100644 --- a/src/posix/cocoa/st_console.mm +++ b/src/posix/cocoa/st_console.mm @@ -373,7 +373,8 @@ void FConsoleWindow::SetTitleText() } NSTextField* titleText = [[NSTextField alloc] initWithFrame:titleTextRect]; - [titleText setStringValue:[NSString stringWithUTF8String:DoomStartupInfo.Name]]; + [titleText setStringValue:[NSString stringWithCString:DoomStartupInfo.Name + encoding:NSISOLatin1StringEncoding]]; [titleText setAlignment:NSCenterTextAlignment]; [titleText setTextColor:RGB(DoomStartupInfo.FgColor)]; [titleText setBackgroundColor:RGB(DoomStartupInfo.BkColor)];