From 4d55a8b8254dff61fdc7b1959f6aef7eafbd9439 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Wed, 9 Nov 2011 20:49:54 +0000 Subject: Patch 10767 (Durandal_1707). git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72138 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/plugins/PeopsXgl/macsrc/drawgl.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'macosx/plugins/PeopsXgl/macsrc/drawgl.m') diff --git a/macosx/plugins/PeopsXgl/macsrc/drawgl.m b/macosx/plugins/PeopsXgl/macsrc/drawgl.m index 91c7ecbf..dcc40ee2 100644 --- a/macosx/plugins/PeopsXgl/macsrc/drawgl.m +++ b/macosx/plugins/PeopsXgl/macsrc/drawgl.m @@ -149,10 +149,15 @@ unsigned long ulInitDisplay(void) // OPEN GAME WINDOW BuildDispMenu(0); } - PluginWindowController *windowController = [PluginWindowController openGameView]; - glView = [windowController getOpenGLView]; + __block PluginWindowController *windowController; + + // this causes a runtime error if it's done on a thread other than the main thread + dispatch_sync(dispatch_get_main_queue(), ^{ + windowController = [PluginWindowController openGameView]; + glView = [windowController getOpenGLView]; - [[windowController window] setTitle:[NSString stringWithCString:pCaptionText]]; + [[windowController window] setTitle:[NSString stringWithCString:pCaptionText encoding:NSUTF8StringEncoding]]; + }); return (unsigned long)[windowController window]; } @@ -182,7 +187,7 @@ void SendContextBack(void) void SetVSync(long myValue) { - long DoItMyFriend = myValue; + GLint DoItMyFriend = myValue; [[glView openGLContext] setValues: &DoItMyFriend forParameter: NSOpenGLCPSwapInterval]; } -- cgit v1.2.3