diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 979f8bad1d..47e400188f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -72,7 +72,7 @@ void OpenGL_SetWindowText(const char *text) #if USE_SDL SDL_WM_SetCaption(text, NULL); #elif defined(HAVE_COCOA) && HAVE_COCOA - cocoaGLSetTitle(); + cocoaGLSetTitle(GLWin.cocoaWin, text); #elif defined(_WIN32) SetWindowText(EmuWindow::GetWnd(), text); #elif defined(USE_WX) && USE_WX diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h b/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h index 125bee832f..7ad54ebf64 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLWindow.h @@ -6,6 +6,14 @@ #include "Config.h" #include "pluginspecs_video.h" +#include + +#if defined(__APPLE__) +#include +#else +#include +#endif + class GLWindow { private: u32 width, height; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h b/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h index 472d738064..274c1c885b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/SDLWindow.h @@ -2,9 +2,7 @@ #define _SDLWINDOW_H #include "GLWindow.h" -#include #include -#include class SDLWindow : public GLWindow { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h b/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h index 2a1f6badfe..7a972947db 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/WXGLWindow.h @@ -2,12 +2,9 @@ #define _WXGLWINDOW_H #include "GLWindow.h" -#include #include "wx/wx.h" #include "wx/glcanvas.h" -#include - class WXGLWindow : public GLWindow { private: diff --git a/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.h b/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.h index 630cdf3c2d..8409de66c9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.h @@ -11,7 +11,7 @@ void cocoaGLCreateApp(); NSWindow *cocoaGLCreateWindow(int w,int h); -void cocoaGLSetTitle(); +void cocoaGLSetTitle(NSWindow *win, const char *title); void cocoaGLMakeCurrent(NSOpenGLContext *ctx, NSWindow *win); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m b/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m index 57047840eb..dcd7896067 100755 --- a/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m +++ b/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m @@ -65,10 +65,13 @@ NSWindow *cocoaGLCreateWindow(int w,int h) return window; } -void cocoaGLSetTitle() +void cocoaGLSetTitle(NSWindow *win, const char *title) { - //todo + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [win setTitle: [[[NSString alloc] initWithCString: title encoding: NSASCIIStringEncoding] autorelease]]; + [pool release]; } void cocoaGLMakeCurrent(NSOpenGLContext *ctx, NSWindow *win)