mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-28 19:23:53 +00:00
991d7de27d
An update broke compilation on versions of Mac OS X that didn't have/can't have Xcode 4 or later, including PowerPC versions.
20 lines
549 B
Text
20 lines
549 B
Text
#ifndef __APPLE__
|
|
#error This file is for Mac OS X only.
|
|
#endif
|
|
|
|
#ifndef __OBJC__
|
|
#error This is Objective-C code. Please compile it as such.
|
|
#endif
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
#include <string>
|
|
|
|
void cocoaMessageBox(const std::string &title, const std::string &msg)
|
|
{
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
NSString *nstitle = [NSString stringWithUTF8String:title.c_str()];
|
|
NSString *nsmsg = [NSString stringWithUTF8String:msg.c_str()];
|
|
NSRunAlertPanel(nstitle, @"%@", nil, nil, nil, nsmsg);
|
|
[pool drain];
|
|
}
|
|
|