Fix compile on osx

Added SetTitle support to cocoa


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1588 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2008-12-18 21:40:50 +00:00
parent 3d9c903a3b
commit fa00041f77
6 changed files with 15 additions and 9 deletions

View File

@ -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

View File

@ -6,6 +6,14 @@
#include "Config.h"
#include "pluginspecs_video.h"
#include <GL/glew.h>
#if defined(__APPLE__)
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
class GLWindow {
private:
u32 width, height;

View File

@ -2,9 +2,7 @@
#define _SDLWINDOW_H
#include "GLWindow.h"
#include <GL/glxew.h>
#include <SDL.h>
#include <GL/gl.h>
class SDLWindow : public GLWindow
{

View File

@ -2,12 +2,9 @@
#define _WXGLWINDOW_H
#include "GLWindow.h"
#include <GL/glew.h>
#include "wx/wx.h"
#include "wx/glcanvas.h"
#include <GL/gl.h>
class WXGLWindow : public GLWindow
{
private:

View File

@ -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);

View File

@ -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)