summaryrefslogtreecommitdiff
path: root/src/video/cocoa/wnd_quartz.mm
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-10-04 21:33:31 +0000
committermichi_cc <michi_cc@openttd.org>2009-10-04 21:33:31 +0000
commit8484e08ee0a55f0615ab747a41741d2925c7ff93 (patch)
tree3b3e34a3576cf1be3dfaedb5e26395d5adfb3d43 /src/video/cocoa/wnd_quartz.mm
parentdffd1be12d18a3ff0476a9dab4aaa696f58e9af4 (diff)
downloadopenttd-8484e08ee0a55f0615ab747a41741d2925c7ff93.tar.xz
(svn r17711) -Codechange: [OSX] Don't use deprecated methods to construct a Cocoa string.
Diffstat (limited to 'src/video/cocoa/wnd_quartz.mm')
-rw-r--r--src/video/cocoa/wnd_quartz.mm3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index c159da7da..7522ef810 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -428,7 +428,6 @@ void WindowQuartzSubdriver::GetDeviceInfo()
bool WindowQuartzSubdriver::SetVideoMode(int width, int height)
{
char caption[50];
- NSString *nsscaption;
unsigned int style;
NSRect contentRect;
BOOL isCustom = NO;
@@ -470,7 +469,7 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height)
[ window setDriver:this ];
snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
- nsscaption = [ [ NSString alloc ] initWithCString:caption ];
+ NSString *nsscaption = [ [ NSString alloc ] initWithUTF8String:caption ];
[ window setTitle: nsscaption ];
[ window setMiniwindowTitle: nsscaption ];
[ nsscaption release ];