Cocoa Port:

- Silence a bunch of console warnings.
This commit is contained in:
rogerman 2016-02-18 07:35:07 +00:00
parent 8f01207e9d
commit 532f78740a
4 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2011 Roger Manuel
Copyright (C) 2012-2015 DeSmuME team
Copyright (C) 2012-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -543,12 +543,15 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
avgMicLevel = 0.0f;
}
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
[self setMicLevel:avgMicLevel];
if (delegate != nil && [delegate respondsToSelector:@selector(doMicLevelUpdateFromController:)])
{
[[self delegate] doMicLevelUpdateFromController:self];
}
[tempPool release];
}
- (uint8_t) handleMicSampleRead:(CoreAudioInput *)caInput softwareMic:(AudioGenerator *)sampleGenerator
@ -586,6 +589,8 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
isEnabled:(BOOL)isHardwareEnabled
isLocked:(BOOL)isHardwareLocked
{
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
if (deviceInfo->objectID == kAudioObjectUnknown)
{
[self setHardwareMicInfoString:@"No hardware input detected."];
@ -613,13 +618,17 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
isEnabled:isHardwareEnabled
isLocked:isHardwareLocked];
}
[tempPool release];
}
- (void) handleMicHardwareGainChanged:(float)gainValue
{
if (delegate != nil && [delegate respondsToSelector:@selector(doMicHardwareGainChangedFromController:gain:)])
{
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
[[self delegate] doMicHardwareGainChangedFromController:self gain:gainValue];
[tempPool release];
}
}

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2011 Roger Manuel
Copyright (C) 2011-2015 DeSmuME team
Copyright (C) 2011-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -273,12 +273,10 @@ static NSMutableDictionary *saveTypeValues = nil;
NSString *advscDBPath = [[NSUserDefaults standardUserDefaults] stringForKey:@"Advanscene_DatabasePath"];
if (advscDBPath != nil)
{
NSError *xmlError = [[NSError alloc] init];
NSXMLParser *advscDB = [[NSXMLParser alloc] initWithContentsOfURL:[NSURL fileURLWithPath:advscDBPath]];
[advscDB setDelegate:self];
[advscDB parse];
[advscDB release];
[xmlError release];
}
NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"DidLoad", self.fileURL, @"URL", nil];

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2011 Roger Manuel
Copyright (C) 2012-2013 DeSmuME team
Copyright (C) 2012-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -121,7 +121,8 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain];
+ (NSInteger) getIBActionSenderTag:(id)sender
{
NSInteger senderTag = 0;
if ([sender isKindOfClass:[NSButton class]])
if ([sender isKindOfClass:[NSButton class]] ||
[sender isKindOfClass:[NSMenuItem class]])
{
senderTag = [sender tag];
}

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2011 Roger Manuel
Copyright (C) 2011-2015 DeSmuME Team
Copyright (C) 2011-2016 DeSmuME Team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -248,7 +248,7 @@
[emuControl updateMicStatusIcon];
//Bring the application to the front
[NSApp activateIgnoringOtherApps:TRUE];
[NSApp activateIgnoringOtherApps:YES];
[self restoreDisplayWindowStates];
// Load a new ROM on launch per user preferences.