diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-08-26 18:54:31 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-08-26 18:54:31 +0000 |
| commit | 72ad931e440ea54f5ee96a9a1be327c3659fcdc6 (patch) | |
| tree | 04d4fe5483d6f4211f53f71431874ab0e9b93bb1 /macosx/plugins/Bladesio1/macsrc/PluginConfigController.m | |
| parent | d52c7e81224c9ad5ac3496f69f88ce14f872a0a5 (diff) | |
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
Diffstat (limited to 'macosx/plugins/Bladesio1/macsrc/PluginConfigController.m')
| -rwxr-xr-x | macosx/plugins/Bladesio1/macsrc/PluginConfigController.m | 23 |
1 files changed, 9 insertions, 14 deletions
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]]; |
