From 72ad931e440ea54f5ee96a9a1be327c3659fcdc6 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Mon, 26 Aug 2013 18:54:31 +0000 Subject: Minor changes to the Sio1 plug-in for OS X. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86936 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../Bladesio1/macsrc/PluginConfigController.m | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'macosx/plugins/Bladesio1/macsrc/PluginConfigController.m') diff --git a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m index e99bf684..55de5c0b 100755 --- a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m +++ b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m @@ -82,24 +82,19 @@ static inline void RunOnMainThreadSync(dispatch_block_t block) void ConfDlgProc() { - __block NSWindow *window; - __block PluginConfigController *tmpWindowController = nil; - //We need this block due to the xib's use of auto layout RunOnMainThreadSync(^{ + NSWindow *window; if (windowController == nil) { - tmpWindowController = [[PluginConfigController alloc] initWithWindowNibName:@"Bladesio1PluginConfig"]; + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"Bladesio1PluginConfig"]; } - window = [(windowController ? windowController : tmpWindowController) window]; + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; }); - if (!windowController) { - windowController = tmpWindowController; - } - - [windowController loadValues]; - - [window center]; - [window makeKeyAndOrderFront:nil]; } void ReadConfig() @@ -109,7 +104,7 @@ void ReadConfig() [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: [NSDictionary dictionaryWithObjectsAndKeys: @NO, kSioEnabled, - @((u16)33307), kSioPort, + @33307, kSioPort, @"127.0.0.1", kSioIPAddress, @(PLAYER_DISABLED), kSioPlayer, nil], PrefsKey, nil]]; -- cgit v1.2.3