summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/os/macosx/macos.mm2
-rw-r--r--src/video/cocoa/cocoa_v.mm2
-rw-r--r--src/video/cocoa/wnd_quartz.mm3
-rw-r--r--src/video/cocoa/wnd_quickdraw.mm2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm
index 35c5cb061..8ec1fdc81 100644
--- a/src/os/macosx/macos.mm
+++ b/src/os/macosx/macos.mm
@@ -59,7 +59,7 @@ void GetMacOSVersion(int *return_major, int *return_minor, int *return_bugfix)
void ShowMacDialog(const char *title, const char *message, const char *buttonLabel)
{
- NSRunAlertPanel([NSString stringWithCString: title], [NSString stringWithCString: message], [NSString stringWithCString: buttonLabel], nil, nil);
+ NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil);
}
#elif defined WITH_COCOA
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index a6c9b34c6..f8458e357 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -405,7 +405,7 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
}
QZ_ShowMouse();
- NSRunAlertPanel([NSString stringWithCString: title], [NSString stringWithCString: message], [NSString stringWithCString: buttonLabel], nil, nil);
+ NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil);
if (!wasstarted && _video_driver != NULL) _video_driver->Stop();
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 ];
diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm
index 8a7e7b45b..f888c7d4d 100644
--- a/src/video/cocoa/wnd_quickdraw.mm
+++ b/src/video/cocoa/wnd_quickdraw.mm
@@ -402,7 +402,7 @@ bool WindowQuickdrawSubdriver::SetVideoMode(int width, int height)
[ window setDriver:this ];
snprintf(caption, sizeof(caption), "OpenTTD %s", _openttd_revision);
- nsscaption = [ [ NSString alloc ] initWithCString:caption ];
+ nsscaption = [ [ NSString alloc ] initWithUTF8String:caption ];
[ window setTitle:nsscaption ];
[ window setMiniwindowTitle:nsscaption ];
[ nsscaption release ];