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 | |
| 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
23 files changed, 72 insertions, 68 deletions
diff --git a/macosx/Pcsxr.xcodeproj/project.pbxproj b/macosx/Pcsxr.xcodeproj/project.pbxproj index 7f293a1d..1d867f2b 100644 --- a/macosx/Pcsxr.xcodeproj/project.pbxproj +++ b/macosx/Pcsxr.xcodeproj/project.pbxproj @@ -536,7 +536,7 @@ 551A753117868BEB0052D185 /* xkb.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = xkb.c; sourceTree = "<group>"; }; 551A753717868BEB0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; }; 551A753917868BEB0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/DFNet.xib; sourceTree = "<group>"; }; - 551A753B17868BEB0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + 551A753B17868BEB0052D185 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 551A753D17868BEB0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; 551A753F17868BEC0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/SockDialog.xib; sourceTree = "<group>"; }; 551A754017868BEC0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; @@ -584,7 +584,7 @@ 551A757F17868BED0052D185 /* NetSfPeopsSoftGPUInterface.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NetSfPeopsSoftGPUInterface.xib; sourceTree = "<group>"; }; 551A758417868BED0052D185 /* ARCBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ARCBridge.h; path = ../ARCBridge.h; sourceTree = "<group>"; }; 551A758617868BED0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; }; - 551A758817868BED0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; + 551A758817868BED0052D185 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 551A758A17868BED0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; 551A758C17868BED0052D185 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/NetSfPeopsOpenGLConfig.xib; sourceTree = "<group>"; }; 551A758D17868BED0052D185 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; @@ -1112,8 +1112,8 @@ 551A74AF17868BE90052D185 /* plugins */ = { isa = PBXGroup; children = ( - 551A74B017868BE90052D185 /* Bladesio1 */, 551A74C317868BEA0052D185 /* Common */, + 551A74B017868BE90052D185 /* Bladesio1 */, 551A750417868BEA0052D185 /* DFCdrom */, 551A751817868BEB0052D185 /* DFInput */, 551A753217868BEB0052D185 /* DFNet */, diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m index b254a215..e13bca27 100755 --- a/macosx/PcsxrController.m +++ b/macosx/PcsxrController.m @@ -602,7 +602,7 @@ otherblock();\ if (str) { NSString *tmpNSStr = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:str length:strlen(str)]; if (!tmpNSStr) { - tmpNSStr = [NSString stringWithCString:str encoding:NSUTF8StringEncoding]; + tmpNSStr = @(str); } [defaults setObject:tmpNSStr forKey:defaultKey]; diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index 90961cc2..e7b194fc 100755 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -224,7 +224,6 @@ static inline void CopyMemcardData(char *from, char *to, int srci, int dsti, cha }else { cardArray = [self memCard2Array]; } - // search for empty (formatted) blocks first while (i < MAX_MEMCARD_BLOCKS && foundcount < len) { diff --git a/macosx/PcsxrPlugin.m b/macosx/PcsxrPlugin.m index 67b532b4..8fd720a4 100755 --- a/macosx/PcsxrPlugin.m +++ b/macosx/PcsxrPlugin.m @@ -191,7 +191,7 @@ PSE_getLibName = (PSEgetLibName) SysLoadSym(pluginRef, "PSEgetLibName"); if (SysLibError() == nil) { - name = [[NSString alloc] initWithCString:PSE_getLibName() encoding:NSUTF8StringEncoding]; + name = RETAINOBJ(@(PSE_getLibName())); } PSE_getLibVersion = (PSEgetLibVersion) SysLoadSym(pluginRef, "PSEgetLibVersion"); diff --git a/macosx/PluginList.m b/macosx/PluginList.m index ce65ebe4..56dc087b 100755 --- a/macosx/PluginList.m +++ b/macosx/PluginList.m @@ -188,7 +188,6 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P if ([activePadPlugin runAs:PSE_LT_PAD] != 0) bad = YES; if ([activeNetPlugin runAs:PSE_LT_NET] != 0) bad = YES; if ([activeSIO1Plugin runAs:PSE_LT_SIO1] != 0) bad = YES; - return !bad; } diff --git a/macosx/main.m b/macosx/main.m index 2b73320e..595475dd 100755 --- a/macosx/main.m +++ b/macosx/main.m @@ -123,16 +123,16 @@ void SysMessage(const char *fmt, ...) { va_end(list); NSDictionary *userInfo = [NSDictionary dictionaryWithObject:msg forKey:NSLocalizedFailureReasonErrorKey]; + RELEASEOBJ(msg); dispatch_sync(dispatch_get_main_queue(), ^{ [NSApp presentError:[NSError errorWithDomain:@"Unknown Domain" code:-1 userInfo:userInfo]]; }); - - RELEASEOBJ(msg); } void *SysLoadLibrary(const char *lib) { - NSBundle *bundle = [NSBundle bundleWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:lib length:strlen(lib)]]; + NSBundle *bundle = [[NSBundle alloc] initWithPath:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:lib length:strlen(lib)]]; if (bundle != nil) { + AUTORELEASEOBJNORETURN(bundle); return dlopen([[bundle executablePath] fileSystemRepresentation], RTLD_LAZY /*RTLD_NOW*/); } return dlopen(lib, RTLD_LAZY); diff --git a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m index e6a7fa1e..609976ef 100755 --- a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m +++ b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m @@ -58,7 +58,7 @@ void AboutDlgProc() [icon setSize:size]; NSDictionary *infoPaneDict = - [NSDictionary dictionaryWithObjectsAndKeys: + [[NSDictionary alloc] initWithObjectsAndKeys: [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", icon, @"ApplicationIcon", [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", @@ -69,6 +69,7 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [app orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); + RELEASEOBJ(infoPaneDict); } void ConfDlgProc() @@ -205,8 +206,8 @@ char* PLUGLOC(char *toloc) { NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]]; NSString *origString = nil, *transString = nil; - origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + origString = @(toloc); transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; - return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding]; + return (char*)[transString UTF8String]; } diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m index ac2f85c3..95f57fb5 100755 --- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m @@ -52,7 +52,7 @@ void AboutDlgProc() [icon setSize:size]; NSDictionary *infoPaneDict = - [NSDictionary dictionaryWithObjectsAndKeys: + [[NSDictionary alloc] initWithObjectsAndKeys: [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", icon, @"ApplicationIcon", [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", @@ -63,6 +63,7 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [app orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); + RELEASEOBJ(infoPaneDict); } void ConfDlgProc() @@ -168,8 +169,8 @@ char* PLUGLOC(char *toloc) { NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]]; NSString *origString = nil, *transString = nil; - origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + origString = @(toloc); transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; - return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding]; + return (char*)[transString UTF8String]; } diff --git a/macosx/plugins/DFInput/macsrc/ControllerList.m b/macosx/plugins/DFInput/macsrc/ControllerList.m index 609af2e2..4e208cab 100755 --- a/macosx/plugins/DFInput/macsrc/ControllerList.m +++ b/macosx/plugins/DFInput/macsrc/ControllerList.m @@ -126,7 +126,7 @@ static const int DPad[DKEY_TOTAL] = { GetAnalogDescription(buf, currentController, rowIndex / 4, rowIndex % 4); } - return [NSString stringWithUTF8String:buf]; + return @(buf); } } diff --git a/macosx/plugins/DFInput/macsrc/PadController.m b/macosx/plugins/DFInput/macsrc/PadController.m index 41a59b10..87e25407 100755 --- a/macosx/plugins/DFInput/macsrc/PadController.m +++ b/macosx/plugins/DFInput/macsrc/PadController.m @@ -51,7 +51,7 @@ void DoAbout() { [icon setSize:size]; NSDictionary *infoPaneDict = - [NSDictionary dictionaryWithObjectsAndKeys: + [[NSDictionary alloc] initWithObjectsAndKeys: [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", icon, @"ApplicationIcon", [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", @@ -62,6 +62,7 @@ void DoAbout() { dispatch_async(dispatch_get_main_queue(), ^{ [app orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); + RELEASEOBJ(infoPaneDict); } long DoConfiguration() { @@ -148,7 +149,7 @@ char* PLUGLOC(char *toloc) { NSBundle *mainBundle = [NSBundle bundleForClass:[PadController class]]; NSString *origString = nil, *transString = nil; - origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + origString = @(toloc); transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; - return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding]; + return (char*)[transString UTF8String]; } diff --git a/macosx/plugins/DFInput/macsrc/PadView.m b/macosx/plugins/DFInput/macsrc/PadView.m index 72c99eb5..8d1be4af 100755 --- a/macosx/plugins/DFInput/macsrc/PadView.m +++ b/macosx/plugins/DFInput/macsrc/PadView.m @@ -69,7 +69,7 @@ [deviceMenu addItemWithTitle:@"(Keyboard only)"]; for (i = 0; i < SDL_NumJoysticks(); i++) { - [deviceMenu addItemWithTitle:[NSString stringWithUTF8String:SDL_JoystickName(i)]]; + [deviceMenu addItemWithTitle:@(SDL_JoystickName(i))]; } if (g.cfg.PadDef[which].DevNum >= SDL_NumJoysticks()) { diff --git a/macosx/plugins/DFNet/English.lproj/InfoPlist.strings b/macosx/plugins/DFNet/English.lproj/InfoPlist.strings Binary files differindex cf210c17..51a3d518 100755 --- a/macosx/plugins/DFNet/English.lproj/InfoPlist.strings +++ b/macosx/plugins/DFNet/English.lproj/InfoPlist.strings diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m index 5f98e4a9..53f1567a 100755 --- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m @@ -54,7 +54,7 @@ void AboutDlgProc() [icon setSize:NSMakeSize(64, 64)]; NSDictionary *infoPaneDict = - [NSDictionary dictionaryWithObjectsAndKeys: + [[NSDictionary alloc] initWithObjectsAndKeys: [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", icon, @"ApplicationIcon", [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", @@ -65,6 +65,7 @@ void AboutDlgProc() dispatch_async(dispatch_get_main_queue(), ^{ [app orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); + RELEASEOBJ(infoPaneDict); } void ConfDlgProc() @@ -144,8 +145,8 @@ char* PLUGLOC(char *toloc) { NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]]; NSString *origString = nil, *transString = nil; - origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + origString = @(toloc); transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; - return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding]; + return (char*)[transString UTF8String]; } diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m index f175e7fa..065afc26 100755 --- a/macosx/plugins/DFNet/macsrc/SockDialog.m +++ b/macosx/plugins/DFNet/macsrc/SockDialog.m @@ -23,7 +23,7 @@ void SysMessage(const char *fmt, ...) va_end(list); //sprintf(cmd, "message %s\n", msg); - NSString *errString = [NSString stringWithUTF8String:msg]; + NSString *errString = @(msg); fprintf(stderr, "%s", msg); NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"Exit" alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@", errString]; [alert setAlertStyle:NSCriticalAlertStyle]; diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m index 7b145a21..49cd371b 100755 --- a/macosx/plugins/DFSound/macsrc/PluginController.m +++ b/macosx/plugins/DFSound/macsrc/PluginController.m @@ -66,7 +66,7 @@ void DoAbout() [icon setSize:size]; NSDictionary *infoPaneDict = - [NSDictionary dictionaryWithObjectsAndKeys: + [[NSDictionary alloc] initWithObjectsAndKeys: [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", icon, @"ApplicationIcon", [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", @@ -77,6 +77,7 @@ void DoAbout() dispatch_async(dispatch_get_main_queue(), ^{ [app orderFrontStandardAboutPanelWithOptions:infoPaneDict]; }); + RELEASEOBJ(infoPaneDict); } long DoConfiguration() @@ -189,27 +190,27 @@ void ReadConfig(void) { Class thisClass = [self class]; - NSBundle *mainBundle = [NSBundle bundleForClass:thisClass]; + NSBundle *spuBundle = [NSBundle bundleForClass:thisClass]; [interpolValue setStrings:@[ - [mainBundle localizedStringForKey:@"(No Interpolation)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Simple Interpolation)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Gaussian Interpolation)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Cubic Interpolation)" value:@"" table:nil]]]; + [spuBundle localizedStringForKey:@"(No Interpolation)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Simple Interpolation)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Gaussian Interpolation)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Cubic Interpolation)" value:@"" table:nil]]]; interpolValue.pluginClass = thisClass; [reverbValue setStrings:@[ - [mainBundle localizedStringForKey:@"(No Reverb)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Simple Reverb)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(PSX Reverb)" value:@"" table:nil]]]; + [spuBundle localizedStringForKey:@"(No Reverb)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Simple Reverb)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(PSX Reverb)" value:@"" table:nil]]]; reverbValue.pluginClass = thisClass; [volumeValue setStrings:@[ - [mainBundle localizedStringForKey:@"(Muted)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Low)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Medium)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Loud)" value:@"" table:nil], - [mainBundle localizedStringForKey:@"(Loudest)" value:@"" table:nil]]]; + [spuBundle localizedStringForKey:@"(Muted)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Low)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Medium)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Loud)" value:@"" table:nil], + [spuBundle localizedStringForKey:@"(Loudest)" value:@"" table:nil]]]; volumeValue.pluginClass = thisClass; } 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 diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m index 95eb38da..2932d3d7 100755 --- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m @@ -323,7 +323,6 @@ void ReadConfig(void) [fragmentShaderViewablePath setToolTip:[fragmentPath path]]; unsigned int hackValues = [[keyValues objectForKey:@"Hacks"] unsignedIntValue]; - NSArray *views = [hacksView subviews]; for (NSView *control in views) { if ([control isKindOfClass:[NSButton class]]) { @@ -359,8 +358,8 @@ char* PLUGLOC(char *toloc) { NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]]; NSString *origString = nil, *transString = nil; - origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + origString = @(toloc); transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; - return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding]; + return (char*)[transString UTF8String]; } diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m index 388049cf..f17e1f5b 100755 --- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m @@ -169,7 +169,6 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) } - [NSOpenGLContext clearCurrentContext]; [glLock unlock]; diff --git a/macosx/plugins/DFXVideo/macsrc/drawgl.m b/macosx/plugins/DFXVideo/macsrc/drawgl.m index ae5ab6fb..fd127469 100755 --- a/macosx/plugins/DFXVideo/macsrc/drawgl.m +++ b/macosx/plugins/DFXVideo/macsrc/drawgl.m @@ -118,7 +118,7 @@ unsigned long ulInitDisplay(void) // OPEN GAME WINDOW PluginWindowController *windowController = [PluginWindowController openGameView]; glView = [windowController openGLView]; - NSString *title = [NSString stringWithCString:pCaptionText encoding:NSUTF8StringEncoding]; + NSString *title = @(pCaptionText); [[windowController window] setTitle:title]; window = [windowController window]; }); diff --git a/macosx/plugins/PeopsXgl/English.lproj/InfoPlist.strings b/macosx/plugins/PeopsXgl/English.lproj/InfoPlist.strings Binary files differindex 6aa8ae00..c00fde43 100644 --- a/macosx/plugins/PeopsXgl/English.lproj/InfoPlist.strings +++ b/macosx/plugins/PeopsXgl/English.lproj/InfoPlist.strings diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m index 12680d5a..37793acc 100755 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m @@ -160,7 +160,6 @@ void ReadConfig(void) //NOTE this is NOT the "keyValues" member of the controller. Just sayin. NSDictionary* keyValues = [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]; - // bind all prefs settings to their PCSXR counterparts // with a little finagling to make it work as expected iShowFPS = [[keyValues objectForKey:@"FPS Counter"] boolValue]; @@ -245,7 +244,6 @@ void ReadConfig(void) dwActFixes = 0; // for now... TODO #endif - SetFixes(); // need this or you'll be playing at light speed: @@ -368,7 +366,7 @@ char* PLUGLOC(char *toloc) { NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]]; NSString *origString = nil, *transString = nil; - origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + origString = @(toloc); transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; - return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding]; + return (char*)[transString UTF8String]; } diff --git a/macosx/plugins/PeopsXgl/macsrc/drawgl.m b/macosx/plugins/PeopsXgl/macsrc/drawgl.m index 99637e64..c2714769 100755 --- a/macosx/plugins/PeopsXgl/macsrc/drawgl.m +++ b/macosx/plugins/PeopsXgl/macsrc/drawgl.m @@ -154,7 +154,7 @@ unsigned long ulInitDisplay(void) // OPEN GAME WINDOW windowController = [PluginWindowController openGameView]; glView = [windowController openGLView]; - [[windowController window] setTitle:[NSString stringWithCString:pCaptionText encoding:NSUTF8StringEncoding]]; + [[windowController window] setTitle:@(pCaptionText)]; }); return (unsigned long)[windowController window]; diff --git a/plugins/dfxvideo/soft.c b/plugins/dfxvideo/soft.c index 3326ebc9..a59b37e3 100755 --- a/plugins/dfxvideo/soft.c +++ b/plugins/dfxvideo/soft.c @@ -1213,7 +1213,7 @@ static __inline int shl10idiv(int x, int y) { __int64 bi=x; bi<<=10; - return bi/y; + return (int)(bi/y); } #endif |
