summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFNet/macsrc
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-22 23:53:37 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-22 23:53:37 +0000
commit531ad373b2c22e00a341a6635023cf8949571bd5 (patch)
tree029961f0aa19ec396f6d7cc09f3ff93987c9aa62 /macosx/plugins/DFNet/macsrc
parent9628a367530657e7fefb17be0a125dbe3f5d7614 (diff)
downloadpcsxr-531ad373b2c22e00a341a6635023cf8949571bd5.tar.gz
Moving most of the OS X preferences to auto layout, and all to 10.7.
Changing some lists of independent checkbox buttons to matrices. Fix a discrepancy between SDL versions 1.2 and 2.0 APIs in OS X's input preferences. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86849 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFNet/macsrc')
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/PluginConfigController.m33
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/SockDialog.h5
2 files changed, 25 insertions, 13 deletions
diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
index c25bd8bf..bb3b1061 100755
--- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
@@ -32,6 +32,15 @@
static PluginConfigController *windowController = nil;
+static inline void RunOnMainThreadSync(dispatch_block_t block)
+{
+ if ([NSThread isMainThread]) {
+ block();
+ } else {
+ dispatch_sync(dispatch_get_main_queue(), block);
+ }
+}
+
void AboutDlgProc()
{
// Get parent application instance
@@ -70,17 +79,19 @@ void AboutDlgProc()
void ConfDlgProc()
{
- NSWindow *window;
-
- if (windowController == nil) {
- windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFNet"];
- }
- window = [windowController window];
-
- [windowController loadValues];
-
- [window center];
- [window makeKeyAndOrderFront:nil];
+ RunOnMainThreadSync(^{
+ NSWindow *window;
+
+ if (windowController == nil) {
+ windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFNet"];
+ }
+ window = [windowController window];
+
+ [windowController loadValues];
+
+ [window center];
+ [window makeKeyAndOrderFront:nil];
+ });
}
void ReadConfig()
diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.h b/macosx/plugins/DFNet/macsrc/SockDialog.h
index 2898ceec..18f10bfd 100755
--- a/macosx/plugins/DFNet/macsrc/SockDialog.h
+++ b/macosx/plugins/DFNet/macsrc/SockDialog.h
@@ -9,8 +9,9 @@
#import <Cocoa/Cocoa.h>
-@interface SockDialog : NSWindowController {
-
+@interface SockDialog : NSWindowController
+{
+ IBOutlet NSProgressIndicator *spinningBar;
}
- (IBAction)cancel:(id)sender;
@end