summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-17 20:06:59 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-17 20:06:59 +0000
commit37ba81a540460a7d34a33c23d2353ac84f887576 (patch)
tree64490fe788c3efbc894bc4e418e098e8696a8040 /macosx/plugins/DFXVideo/macsrc/PluginGLView.h
parent30195666f40ca64b0bdf34ed783215d27f000cd7 (diff)
downloadpcsxr-37ba81a540460a7d34a33c23d2353ac84f887576.tar.gz
Make more plug-ins use and implement RunOnMainThreadSync.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86706 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFXVideo/macsrc/PluginGLView.h')
-rwxr-xr-xmacosx/plugins/DFXVideo/macsrc/PluginGLView.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.h b/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
index fe2e5f78..77fe06c9 100755
--- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
+++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.h
@@ -24,6 +24,15 @@
#define IMAGE_COUNT 2
+static inline void RunOnMainThreadSync(dispatch_block_t block)
+{
+ if ([NSThread isMainThread]) {
+ block();
+ } else {
+ dispatch_sync(dispatch_get_main_queue(), block);
+ }
+}
+
@interface PluginGLView : NSOpenGLView
{
GLubyte *image_base;