diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-05 21:59:24 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-05 21:59:24 +0000 |
| commit | d50bdc6fb2378fc3219e14c47a7b1adc60ee2203 (patch) | |
| tree | 924bce4490768605b7c0041db20a40e074a597b1 /macosx/plugins/DFSound/macsrc/SPUPluginController.m | |
| parent | 3296522bfedc2c72cb7d3f4476a64db8bbf38e8f (diff) | |
| download | pcsxr-d50bdc6fb2378fc3219e14c47a7b1adc60ee2203.tar.gz | |
Change some +stringWithCString and -initWithCString:encoding: to modern Objective-C syntax.
Change the encoding of a couple of info.plists to UTF-8, otherwise Xcode was complaining.
Removing some extra line breaks on OS X code.
Other minor changes.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85867 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFSound/macsrc/SPUPluginController.m')
| -rw-r--r-- | macosx/plugins/DFSound/macsrc/SPUPluginController.m | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/macosx/plugins/DFSound/macsrc/SPUPluginController.m b/macosx/plugins/DFSound/macsrc/SPUPluginController.m index bfc11f01..da08f700 100644 --- a/macosx/plugins/DFSound/macsrc/SPUPluginController.m +++ b/macosx/plugins/DFSound/macsrc/SPUPluginController.m @@ -10,48 +10,53 @@ @implementation SPUPluginController +static Class GetSPUBaseClass() +{ + static Class spuBaseClass; + if (!spuBaseClass) { + spuBaseClass = [SPUPluginController class]; + } + return spuBaseClass; +} + static inline void FuncNotAvailable(id sel, id sender, SEL theCmd) { #ifdef DEBUG - NSLog(@"Class %@ does not implement %@, and was sent a(n) %@ with the description %@", [sel class], NSStringFromSelector(theCmd), [sender class], [sender description]); - if ([sel isMemberOfClass:[SPUPluginController class]]) { - NSLog(@"For one thing, the class %@ isn't supposed to be accessed directly, just subclassed!", [SPUPluginController class]); \ + NSString *selString = NSStringFromSelector(theCmd); + if (sender) { + NSLog(@"Class %@ does not implement %@, and was sent a(n) %@ with the description %@", [sel class], selString, [sender class], [sender description]); + } else { + NSLog(@"Class %@ does not implement %@", [sel class], selString); + } + if ([sel isMemberOfClass:GetSPUBaseClass()]) { + NSLog(@"For one thing, the class %@ isn't supposed to be accessed directly, just subclassed!", GetSPUBaseClass()); \ } else { - NSLog(@"You should implement %@ for your class %@. As it is, you are calling %@ from the superclass %@.", NSStringFromSelector(theCmd), [sel class], NSStringFromSelector(theCmd), [SPUPluginController class]); + NSLog(@"You should implement %@ for your class %@. As it is, you are calling %@ from the superclass %@.", selString, [sel class], selString, GetSPUBaseClass()); } #endif [sel doesNotRecognizeSelector:theCmd]; } -#define NotAvailableWarn() FuncNotAvailable(self, sender, _cmd) +#define NotAvailableWarn(sender) FuncNotAvailable(self, sender, _cmd) - (IBAction)cancel:(id)sender { - NotAvailableWarn(); - + NotAvailableWarn(sender); } - (IBAction)ok:(id)sender { - NotAvailableWarn(); + NotAvailableWarn(sender); } - (IBAction)reset:(id)sender { - NotAvailableWarn(); + NotAvailableWarn(sender); } - (void)loadValues { -#ifdef DEBUG - NSLog(@"Class %@ does not implement %@", [self class], NSStringFromSelector(_cmd)); - if ([self isMemberOfClass:[SPUPluginController class]]) { - NSLog(@"For one thing, the class %@ isn't supposed to be accessed directly, just subclassed!", [SPUPluginController class]); - } else { - NSLog(@"You should implement %@ for your class %@. As it is, you are calling %@ from the superclass %@.", NSStringFromSelector(_cmd), [self class], NSStringFromSelector(_cmd), [SPUPluginController class]); - } -#endif - [self doesNotRecognizeSelector:_cmd]; + NotAvailableWarn(nil); } @end |
