From 4aac2d263b60338ceed35a38acd166e9731faf35 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 17 Oct 2016 11:24:31 +0200 Subject: [PATCH 1/3] Fixed: Bundle name under OS X --HG-- branch : develop --- .../tools/client/client_config_qt/src/client_config_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp b/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp index 5ec5b2a60..826f0e9c4 100644 --- a/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp +++ b/code/ryzom/tools/client/client_config_qt/src/client_config_dialog.cpp @@ -167,7 +167,7 @@ void CClientConfigDialog::onClickPlay() clientFullPath += "ryzom_client_r.exe"; #endif #elif defined(Q_OS_MAC) - clientFullPath += "Ryzom"; + clientFullPath += "Ryzom.app"; #else clientFullPath += "ryzom_client"; #endif From c9fa01f67085b929822555b377e4cd87bbf54455 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 17 Oct 2016 11:24:49 +0200 Subject: [PATCH 2/3] Changed: Minor change --HG-- branch : develop --- code/nel/src/3d/scene_group.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/code/nel/src/3d/scene_group.cpp b/code/nel/src/3d/scene_group.cpp index fa67230d4..1d98f21bb 100644 --- a/code/nel/src/3d/scene_group.cpp +++ b/code/nel/src/3d/scene_group.cpp @@ -451,7 +451,6 @@ void CInstanceGroup::serial (NLMISC::IStream& f) _PointLightArray.clear(); } - if (version >= 2) f.serial(_GlobalPos); From 0e3785b1cf25bb0fdb4a99189090de95a35ffdba Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 17 Oct 2016 11:48:58 +0200 Subject: [PATCH 3/3] Fixed: Call Cocoa API when required to not conflict with Qt --HG-- branch : develop --- .../src/3d/driver/opengl/driver_opengl.cpp | 23 ------------------- .../3d/driver/opengl/driver_opengl_window.cpp | 17 +++++++++++++- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index 6ab0e3336..ac70a7cd7 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -196,18 +196,6 @@ CDriverGL::CDriverGL() _backBufferHeight = 0; _backBufferWidth = 0; - // autorelease pool for memory management - _autoreleasePool = [[NSAutoreleasePool alloc] init]; - - // init the application object - [NSApplication sharedApplication]; - - // create the menu in the top screen bar - setupApplicationMenu(); - - // finish the application launching - [NSApp finishLaunching]; - #elif defined (NL_OS_UNIX) _dpy = 0; @@ -373,10 +361,6 @@ CDriverGL::~CDriverGL() { H_AUTO_OGL(CDriverGL_CDriverGLDtor) release(); - -#if defined(NL_OS_MAC) - [_autoreleasePool release]; -#endif } // -------------------------------------------------- @@ -942,13 +926,6 @@ bool CDriverGL::swapBuffers() #elif defined(NL_OS_MAC) - // TODO: maybe do this somewhere else? - if(_DestroyWindow) - { - [_autoreleasePool release]; - _autoreleasePool = [[NSAutoreleasePool alloc] init]; - } - [_ctx flushBuffer]; #elif defined (NL_OS_UNIX) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index c826238ea..860f27353 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -343,9 +343,14 @@ bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc) retrieveATIDriverVersion(); #elif defined(NL_OS_MAC) - // nothing to do nlunreferenced(windowIcon); + // autorelease pool for memory management + _autoreleasePool = [[NSAutoreleasePool alloc] init]; + + // init the application object + [NSApplication sharedApplication]; + #elif defined (NL_OS_UNIX) nlunreferenced(windowIcon); @@ -486,6 +491,7 @@ bool CDriverGL::unInit() #elif defined(NL_OS_MAC) // nothing to do + [_autoreleasePool release]; #elif defined (NL_OS_UNIX) @@ -1466,6 +1472,12 @@ bool CDriverGL::createWindow(const GfxMode &mode) #elif defined(NL_OS_MAC) + // create the menu in the top screen bar + setupApplicationMenu(); + + // finish the application launching + [NSApp finishLaunching]; + // describe how the window should look like and behave unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask; @@ -1642,6 +1654,7 @@ bool CDriverGL::destroyWindow() } #elif defined(NL_OS_MAC) + #elif defined(NL_OS_UNIX) if (_DestroyWindow && _ctx) // FIXME: _DestroyWindow may need to be removed here as well @@ -1664,6 +1677,8 @@ bool CDriverGL::destroyWindow() [[containerView() window] release]; [containerView() release]; [_glView release]; + + [_autoreleasePool release]; } _ctx = nil;