diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-09 09:33:55 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-09 09:33:55 +0000 |
| commit | c6c9d266fad98310bb6f0118362d8dc7e60ecfae (patch) | |
| tree | df4f355d09afe3c1deb2a839d56dd1095e073209 /macosx/plugins/Bladesio1/macsrc/PluginConfigController.m | |
| parent | a2e6c179be60efa937f1f51a45c53919bb44083d (diff) | |
| download | pcsxr-c6c9d266fad98310bb6f0118362d8dc7e60ecfae.tar.gz | |
Make the bladesio1 driver work on OS X:
Fix a bug where the wrong plug-in was being used in place of sio1, causing PCSXR to complain.
Fix a bug where bladesio1's config window would cause PCSXR to crash.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85936 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/Bladesio1/macsrc/PluginConfigController.m')
| -rwxr-xr-x | macosx/plugins/Bladesio1/macsrc/PluginConfigController.m | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m index dbc85174..b1b4c08e 100755 --- a/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m +++ b/macosx/plugins/Bladesio1/macsrc/PluginConfigController.m @@ -74,12 +74,19 @@ void AboutDlgProc() void ConfDlgProc() { - NSWindow *window; - - if (windowController == nil) { - windowController = [[PluginConfigController alloc] initWithWindowNibName:@"Bladesio1PluginConfig"]; + __block NSWindow *window; + __block PluginConfigController *tmpWindowController = nil; + + //We need this block due to the xib's use of auto layout + dispatch_sync(dispatch_get_main_queue(), ^{ + if (windowController == nil) { + tmpWindowController = [[PluginConfigController alloc] initWithWindowNibName:@"Bladesio1PluginConfig"]; + } + window = [(windowController ? windowController : tmpWindowController) window]; + }); + if (!windowController) { + windowController = tmpWindowController; } - window = [windowController window]; [windowController loadValues]; |
