BGE: Adding a render.setFullScreen() and a render.getFullScreen() to allow fulscreeni...
[blender.git] / source / gameengine / GamePlayer / ghost / GPG_Canvas.cpp
index 9b01cb5786f3523bd49342175e20e2665be129e5..c438dcdd4a6e4be0433e6fb7dc8f0d1634c04577 100644 (file)
@@ -128,6 +128,19 @@ void GPG_Canvas::ResizeWindow(int width, int height)
        Resize(width, height);
 }
 
+void GPG_Canvas::SetFullScreen(bool enable)
+{
+       if (enable)
+               m_window->setState(GHOST_kWindowStateFullScreen);
+       else
+               m_window->setState(GHOST_kWindowStateNormal);
+}
+
+bool GPG_Canvas::GetFullScreen()
+{
+       return m_window->getState() == GHOST_kWindowStateFullScreen;
+}
+
 float GPG_Canvas::GetMouseNormalizedX(int x)
 {
        return float(x)/this->GetWidth();