GHost: Code cleanup, prepare for strict C++ flags
[blender.git] / intern / ghost / intern / GHOST_System.cpp
index 023c5958c4f584d32796c748c7006be2488cda8b..baa1bdff79ad450ae52e0ef23fff69f5eeefa288 100644 (file)
 
 
 GHOST_System::GHOST_System()
-       : m_nativePixel(false),
-       m_displayManager(NULL),
-       m_timerManager(NULL),
-       m_windowManager(NULL),
-       m_eventManager(NULL)
+    : m_nativePixel(false),
+      m_displayManager(NULL),
+      m_timerManager(NULL),
+      m_windowManager(NULL),
+      m_eventManager(NULL)
 #ifdef WITH_INPUT_NDOF
-       , m_ndofManager(0)
+      , m_ndofManager(0)
 #endif
 {
 }
@@ -169,7 +169,7 @@ GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting
 }
 
 
-GHOST_TSuccess GHOST_System::updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window)
+GHOST_TSuccess GHOST_System::updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow ** /*window*/)
 {
        GHOST_TSuccess success = GHOST_kFailure;
        GHOST_ASSERT(m_windowManager, "GHOST_System::updateFullScreen(): invalid window manager");
@@ -350,6 +350,12 @@ GHOST_TSuccess GHOST_System::exit()
 GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window, const GHOST_DisplaySetting &settings,
                                                     const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
 {
+       GHOST_GLSettings glSettings = {0};
+
+       if (stereoVisual)
+               glSettings.flags |= GHOST_glStereoVisual;
+       glSettings.numOfAASamples = numOfAASamples;
+
        /* note: don't use getCurrentDisplaySetting() because on X11 we may
         * be zoomed in and the desktop may be bigger then the viewport. */
        GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow(): invalid display manager");
@@ -359,14 +365,13 @@ GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window, const
            0, 0, settings.xPixels, settings.yPixels,
            GHOST_kWindowStateNormal,
            GHOST_kDrawingContextTypeOpenGL,
-           stereoVisual,
-           true,  /* exclusive */
-           numOfAASamples);
+           glSettings,
+           true  /* exclusive */);
        return (*window == NULL) ? GHOST_kFailure : GHOST_kSuccess;
 }
 
 
-int GHOST_System::confirmQuit(GHOST_IWindow *window) const
+int GHOST_System::confirmQuit(GHOST_IWindow * /*window*/) const
 {
        return 1;
 }