diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-08-17 20:06:59 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-08-17 20:06:59 +0000 |
| commit | 37ba81a540460a7d34a33c23d2353ac84f887576 (patch) | |
| tree | 64490fe788c3efbc894bc4e418e098e8696a8040 /macosx/plugins/DFXVideo/macsrc/PluginGLView.h | |
| parent | 30195666f40ca64b0bdf34ed783215d27f000cd7 (diff) | |
| download | pcsxr-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-x | macosx/plugins/DFXVideo/macsrc/PluginGLView.h | 9 |
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; |
