diff options
| author | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-09 20:49:54 +0000 |
|---|---|---|
| committer | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-09 20:49:54 +0000 |
| commit | 4d55a8b8254dff61fdc7b1959f6aef7eafbd9439 (patch) | |
| tree | fb5e56131a7c8b729641c70e7a87883ebaea5186 /macosx/plugins/PeopsXgl/macsrc | |
| parent | 71d6c56271e2650b1a2f5149521a5b1896084710 (diff) | |
| download | pcsxr-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')
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/PluginGLView.h | 1 | ||||
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/PluginGLView.m | 14 | ||||
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m | 3 | ||||
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/drawgl.m | 13 |
4 files changed, 25 insertions, 6 deletions
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h index da780293..657ac2ad 100644 --- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h +++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.h @@ -36,6 +36,7 @@ - (void)swapBuffer; // I wonder what this does ;-) +- (void)clearBuffer:(BOOL)display; // overrides: - (id) initWithCoder: (NSCoder *) coder; diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m index feb483a9..483a72d3 100644 --- a/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m +++ b/macosx/plugins/PeopsXgl/macsrc/PluginGLView.m @@ -129,7 +129,19 @@ // actually not much to do here. [[self openGLContext] flushBuffer]; return; - } +} +// don't know what this does, pasted it in from PeopsSoftGPU's PluginGLView because something was calling it +- (void)clearBuffer:(BOOL)display +{ + if (display == NO) { + //[[self openGLContext] makeCurrentContext]; + //glClear(GL_COLOR_BUFFER_BIT); + //[self loadTextures:NO]; + } else { + noDisplay = YES; + // [self setNeedsDisplay:true]; + } +} @end diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m index 0636490a..5f3ee7dd 100644 --- a/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m +++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindowController.m @@ -24,6 +24,7 @@ #import "Carbon/Carbon.h" #include <OpenGL/gl.h> // OpenGL needed for "externals.h" #include "externals.h" +#include "draw.h" // for CreateScanLines() #undef BOOL // not sure why these aren't class or instance variables... @@ -425,5 +426,5 @@ NSRect FitRectInRect(NSRect source, NSRect destination) void ChangeWindowMode(void) { // glue from PSX thread. Globals are already set - [ gameController performFullscreenSwap]; + [ gameController performFullscreenSwap]; } 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]; } |
