mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-04 20:06:41 +01:00
Compiling with rev 63470 of wxWidgets now works with OSX x86_64. There are a BUNCH of errors while running, none fatal from what I've seen. This also fixes Dolphin creating multiple NSWindows when running multiple games.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5041 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
78f8fe2e85
commit
060bbcf067
@ -343,10 +343,7 @@ else:
|
|||||||
env['HAVE_COCOA'] = 0
|
env['HAVE_COCOA'] = 0
|
||||||
|
|
||||||
# handling wx flags CCFLAGS should be created before
|
# handling wx flags CCFLAGS should be created before
|
||||||
if sys.platform == 'darwin' and env['osx'] == '64cocoa':
|
wxmods = ['aui', 'adv', 'core', 'base']
|
||||||
wxmods = ['adv', 'core', 'base']
|
|
||||||
else:
|
|
||||||
wxmods = ['aui', 'adv', 'core', 'base']
|
|
||||||
|
|
||||||
env['USE_WX'] = 0
|
env['USE_WX'] = 0
|
||||||
if env['wxgl']:
|
if env['wxgl']:
|
||||||
|
@ -621,6 +621,7 @@ void OpenGL_Shutdown()
|
|||||||
delete GLWin.glCanvas;
|
delete GLWin.glCanvas;
|
||||||
delete GLWin.frame;
|
delete GLWin.frame;
|
||||||
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
#elif defined(HAVE_COCOA) && HAVE_COCOA
|
||||||
|
cocoaGLDeleteWindow(GLWin.cocoaWin);
|
||||||
cocoaGLDelete(GLWin.cocoaCtx);
|
cocoaGLDelete(GLWin.cocoaCtx);
|
||||||
|
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
|
@ -19,6 +19,8 @@ NSOpenGLContext* cocoaGLInit(int mode);
|
|||||||
|
|
||||||
void cocoaGLDelete(NSOpenGLContext *ctx);
|
void cocoaGLDelete(NSOpenGLContext *ctx);
|
||||||
|
|
||||||
|
void cocoaGLDeleteWindow(NSWindow *window);
|
||||||
|
|
||||||
void cocoaGLSwap(NSOpenGLContext *ctx,NSWindow *window);
|
void cocoaGLSwap(NSOpenGLContext *ctx,NSWindow *window);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -9,6 +9,7 @@ NSWindow *cocoaGLCreateWindow(int w,int h)
|
|||||||
styleMask:NSTitledWindowMask | NSResizableWindowMask
|
styleMask:NSTitledWindowMask | NSResizableWindowMask
|
||||||
backing:NSBackingStoreBuffered
|
backing:NSBackingStoreBuffered
|
||||||
defer:FALSE];
|
defer:FALSE];
|
||||||
|
[window setReleasedWhenClosed: YES];
|
||||||
|
|
||||||
[window setTitle:@"Dolphin on OSX"];
|
[window setTitle:@"Dolphin on OSX"];
|
||||||
//[window makeKeyAndOrderFront: nil];
|
//[window makeKeyAndOrderFront: nil];
|
||||||
@ -37,16 +38,14 @@ void cocoaGLMakeCurrent(NSOpenGLContext *ctx, NSWindow *win)
|
|||||||
[ctx setValues:&value forParameter:NSOpenGLCPSwapInterval];
|
[ctx setValues:&value forParameter:NSOpenGLCPSwapInterval];
|
||||||
|
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
|
|
||||||
[ctx setView:[win contentView]];
|
[ctx setView:[win contentView]];
|
||||||
[ctx update];
|
[ctx update];
|
||||||
[ctx makeCurrentContext];
|
[ctx makeCurrentContext];
|
||||||
} else {
|
|
||||||
[NSOpenGLContext clearCurrentContext];
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
[NSOpenGLContext clearCurrentContext];
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -54,6 +53,7 @@ void cocoaGLMakeCurrent(NSOpenGLContext *ctx, NSWindow *win)
|
|||||||
NSOpenGLContext* cocoaGLInit(int mode)
|
NSOpenGLContext* cocoaGLInit(int mode)
|
||||||
{
|
{
|
||||||
NSAutoreleasePool *pool;
|
NSAutoreleasePool *pool;
|
||||||
|
|
||||||
NSOpenGLPixelFormatAttribute attr[32];
|
NSOpenGLPixelFormatAttribute attr[32];
|
||||||
NSOpenGLPixelFormat *fmt;
|
NSOpenGLPixelFormat *fmt;
|
||||||
NSOpenGLContext *context;
|
NSOpenGLContext *context;
|
||||||
@ -69,6 +69,7 @@ NSOpenGLContext* cocoaGLInit(int mode)
|
|||||||
attr[i++] = mode;
|
attr[i++] = mode;
|
||||||
attr[i++] = NSOpenGLPFASamples;
|
attr[i++] = NSOpenGLPFASamples;
|
||||||
attr[i++] = 1;
|
attr[i++] = 1;
|
||||||
|
|
||||||
attr[i++] = NSOpenGLPFANoRecovery;
|
attr[i++] = NSOpenGLPFANoRecovery;
|
||||||
#ifdef GL_VERSION_1_3
|
#ifdef GL_VERSION_1_3
|
||||||
|
|
||||||
@ -120,6 +121,16 @@ void cocoaGLDelete(NSOpenGLContext *ctx)
|
|||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
void cocoaGLDeleteWindow(NSWindow *window)
|
||||||
|
{
|
||||||
|
|
||||||
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
[window close];
|
||||||
|
[pool release];
|
||||||
|
|
||||||
|
return window;
|
||||||
|
}
|
||||||
|
|
||||||
void cocoaGLSwap(NSOpenGLContext *ctx,NSWindow *window)
|
void cocoaGLSwap(NSOpenGLContext *ctx,NSWindow *window)
|
||||||
{
|
{
|
||||||
@ -129,13 +140,10 @@ void cocoaGLSwap(NSOpenGLContext *ctx,NSWindow *window)
|
|||||||
[window makeKeyAndOrderFront: nil];
|
[window makeKeyAndOrderFront: nil];
|
||||||
|
|
||||||
ctx = [NSOpenGLContext currentContext];
|
ctx = [NSOpenGLContext currentContext];
|
||||||
if (ctx != nil) {
|
if (ctx != nil)
|
||||||
[ctx flushBuffer];
|
[ctx flushBuffer];
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
printf("bad cocoa gl ctx\n");
|
printf("bad cocoa gl ctx\n");
|
||||||
}
|
|
||||||
[pool release];
|
|
||||||
|
|
||||||
|
[pool release];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user