mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Removed trailing tab characters in Cocoa IWAD picker
This commit is contained in:
parent
dac2ae6411
commit
1a69221f80
1 changed files with 12 additions and 12 deletions
|
@ -139,7 +139,7 @@ static NSDictionary* GetKnownFileTypes()
|
||||||
@"-bex" , @"bex",
|
@"-bex" , @"bex",
|
||||||
@"-exec" , @"cfg",
|
@"-exec" , @"cfg",
|
||||||
@"-playdemo", @"lmp",
|
@"-playdemo", @"lmp",
|
||||||
nil];
|
nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
static NSArray* GetKnownExtensions()
|
static NSArray* GetKnownExtensions()
|
||||||
|
@ -156,7 +156,7 @@ static NSArray* GetKnownExtensions()
|
||||||
{
|
{
|
||||||
NSString* extension = [[filePath pathExtension] lowercaseString];
|
NSString* extension = [[filePath pathExtension] lowercaseString];
|
||||||
NSString* parameter = [GetKnownFileTypes() objectForKey:extension];
|
NSString* parameter = [GetKnownFileTypes() objectForKey:extension];
|
||||||
|
|
||||||
if (nil == parameter)
|
if (nil == parameter)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -211,7 +211,7 @@ static NSArray* GetKnownExtensions()
|
||||||
{
|
{
|
||||||
NSArray* files = [openPanel URLs];
|
NSArray* files = [openPanel URLs];
|
||||||
NSMutableString* parameters = [NSMutableString string];
|
NSMutableString* parameters = [NSMutableString string];
|
||||||
|
|
||||||
for (NSUInteger i = 0, ei = [files count]; i < ei; ++i)
|
for (NSUInteger i = 0, ei = [files count]; i < ei; ++i)
|
||||||
{
|
{
|
||||||
NSString* filePath = [[files objectAtIndex:i] path];
|
NSString* filePath = [[files objectAtIndex:i] path];
|
||||||
|
@ -236,9 +236,9 @@ static NSArray* GetKnownExtensions()
|
||||||
{
|
{
|
||||||
newParameters = [newParameters stringByAppendingString:@" "];
|
newParameters = [newParameters stringByAppendingString:@" "];
|
||||||
}
|
}
|
||||||
|
|
||||||
newParameters = [newParameters stringByAppendingString:parameters];
|
newParameters = [newParameters stringByAppendingString:parameters];
|
||||||
|
|
||||||
[parametersTextField setStringValue: newParameters];
|
[parametersTextField setStringValue: newParameters];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ static NSArray* GetKnownExtensions()
|
||||||
[cancelButton setTarget:self];
|
[cancelButton setTarget:self];
|
||||||
[cancelButton setKeyEquivalent:@"\033"];
|
[cancelButton setKeyEquivalent:@"\033"];
|
||||||
[[window contentView] addSubview:cancelButton];
|
[[window contentView] addSubview:cancelButton];
|
||||||
|
|
||||||
browseButton = [[NSButton alloc] initWithFrame:NSMakeRect(14, 8, 96, 32)];
|
browseButton = [[NSButton alloc] initWithFrame:NSMakeRect(14, 8, 96, 32)];
|
||||||
[browseButton setTitle:@"Browse..."];
|
[browseButton setTitle:@"Browse..."];
|
||||||
[browseButton setBezelStyle:NSRoundedBezelStyle];
|
[browseButton setBezelStyle:NSRoundedBezelStyle];
|
||||||
|
@ -398,22 +398,22 @@ static NSString* GetArchitectureString()
|
||||||
static void RestartWithParameters(const char* iwadPath, NSString* parameters)
|
static void RestartWithParameters(const char* iwadPath, NSString* parameters)
|
||||||
{
|
{
|
||||||
assert(nil != parameters);
|
assert(nil != parameters);
|
||||||
|
|
||||||
defaultiwad = ExtractFileBase(iwadPath);
|
defaultiwad = ExtractFileBase(iwadPath);
|
||||||
|
|
||||||
GameConfig->DoGameSetup("Doom");
|
GameConfig->DoGameSetup("Doom");
|
||||||
M_SaveDefaults(NULL);
|
M_SaveDefaults(NULL);
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
@try
|
@try
|
||||||
{
|
{
|
||||||
const int commandLineParametersCount = Args->NumArgs();
|
const int commandLineParametersCount = Args->NumArgs();
|
||||||
assert(commandLineParametersCount > 0);
|
assert(commandLineParametersCount > 0);
|
||||||
|
|
||||||
NSString* executablePath = [NSString stringWithUTF8String:Args->GetArg(0)];
|
NSString* executablePath = [NSString stringWithUTF8String:Args->GetArg(0)];
|
||||||
NSString* architecture = GetArchitectureString();
|
NSString* architecture = GetArchitectureString();
|
||||||
|
|
||||||
NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:commandLineParametersCount + 6];
|
NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:commandLineParametersCount + 6];
|
||||||
[arguments addObject:@"-arch"];
|
[arguments addObject:@"-arch"];
|
||||||
[arguments addObject:architecture];
|
[arguments addObject:architecture];
|
||||||
|
@ -450,7 +450,7 @@ static void RestartWithParameters(const char* iwadPath, NSString* parameters)
|
||||||
{
|
{
|
||||||
NSLog(@"Cannot restart: %@", [e reason]);
|
NSLog(@"Cannot restart: %@", [e reason]);
|
||||||
}
|
}
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue