diff --git a/CMakeLists.txt b/CMakeLists.txt index 2274c6947..0b6e1d889 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ endif() if(SERVER_ONLY) add_definitions(-DSERVER_ONLY) - add_definitions(-DNO_IRR_COMPILE_WITH_X11_ -DNO_IRR_COMPILE_WITH_OPENGL_ -DNO_IRR_COMPILE_WITH_OSX_DEVICE_) + add_definitions(-DNO_IRR_COMPILE_WITH_X11_ -DNO_IRR_COMPILE_WITH_OPENGL_) endif() if(UNIX OR MINGW) diff --git a/lib/irrlicht/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/lib/irrlicht/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm index 7cedf4a67..8fa1c9694 100644 --- a/lib/irrlicht/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm +++ b/lib/irrlicht/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm @@ -549,6 +549,7 @@ CIrrDeviceMacOSX::~CIrrDeviceMacOSX() void CIrrDeviceMacOSX::closeDevice() { +#ifndef SERVER_ONLY if (Window != NULL) { [Window setIsVisible:FALSE]; @@ -586,7 +587,7 @@ void CIrrDeviceMacOSX::closeDevice() } } } - +#endif IsFullscreen = false; IsActive = false; CGLContext = NULL; @@ -594,8 +595,9 @@ void CIrrDeviceMacOSX::closeDevice() bool CIrrDeviceMacOSX::createWindow() { - CGDisplayErr error; bool result=false; +#ifndef SERVER_ONLY + CGDisplayErr error; CGDirectDisplayID display=CGMainDisplayID(); CGLPixelFormatObj pixelFormat; CGRect displayRect; @@ -905,7 +907,7 @@ bool CIrrDeviceMacOSX::createWindow() CGLSetParameter(CGLContext,kCGLCPSwapInterval,&newSwapInterval); } } - +#endif return (result); } @@ -980,11 +982,13 @@ void CIrrDeviceMacOSX::createDriver() void CIrrDeviceMacOSX::flush() { +#ifndef SERVER_ONLY if (CGLContext != NULL) { glFinish(); CGLFlushDrawable(CGLContext); } +#endif } bool CIrrDeviceMacOSX::run()