Buildbot compile fix for os x cross compile

svn-id: r46592
This commit is contained in:
Oystein Eftevaag 2009-12-26 16:00:41 +00:00
parent b2c170168e
commit b21679e56e

View file

@ -31,6 +31,7 @@
#include "common/algorithm.h"
#import <AppKit/NSOpenPanel.h>
#import <Foundation/NSString.h>
namespace GUI {
@ -62,7 +63,11 @@ int BrowserDialog::runModal() {
NSOpenPanel * panel = [NSOpenPanel openPanel];
[panel setCanChooseDirectories:YES];
if ([panel runModalForTypes:nil] == NSOKButton) {
#ifdef __POWERPC__
const char *filename = [[panel filename] cString];
#else
const char *filename = [[panel filename] cStringUsingEncoding:NSUTF8StringEncoding];
#endif
_choice = Common::FSNode(filename);
choiceMade = true;
}