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/DFInput/macsrc | |
| 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/DFInput/macsrc')
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/ControllerList.m | 2 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/PadController.m | 7 | ||||
| -rwxr-xr-x | macosx/plugins/DFInput/macsrc/PadView.m | 2 |
3 files changed, 6 insertions, 5 deletions
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()) { |
