summaryrefslogtreecommitdiff
path: root/macosx/plugins/PeopsXgl/macsrc/drawgl.m
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-09 20:49:54 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-09 20:49:54 +0000
commit4d55a8b8254dff61fdc7b1959f6aef7eafbd9439 (patch)
treefb5e56131a7c8b729641c70e7a87883ebaea5186 /macosx/plugins/PeopsXgl/macsrc/drawgl.m
parent71d6c56271e2650b1a2f5149521a5b1896084710 (diff)
downloadpcsxr-4d55a8b8254dff61fdc7b1959f6aef7eafbd9439.tar.gz
Patch 10767 (Durandal_1707).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72138 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/PeopsXgl/macsrc/drawgl.m')
-rw-r--r--macosx/plugins/PeopsXgl/macsrc/drawgl.m13
1 files changed, 9 insertions, 4 deletions
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];
}