Made sure that windows created on BlackBerry are registered as fullscreen, for now...
[freeglut] / src / blackberry / fg_window_blackberry.c
index 08f6643..ff0c08f 100644 (file)
@@ -98,7 +98,7 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title,
   }*/
 
   /* Create window buffers */
-  if (screen_create_window_buffers(sWindow, 2)) {
+  if (screen_create_window_buffers(sWindow, (fgState.DisplayMode & GLUT_DOUBLE) ? 2 : 1)) {
        screen_destroy_window(sWindow);
        screen_destroy_context(window->Window.pContext.screenContext);
        fgError("Could not create window buffers");
@@ -108,9 +108,10 @@ void fgPlatformOpenWindow( SFG_Window* window, const char* title,
   /* Request window events */
   screen_request_events(window->Window.pContext.screenContext);
 
-  /* Save window */
+  /* Save window and set state */
   window->Window.Handle = fgDisplay.pDisplay.single_native_window;
   window->State.WorkMask |= GLUT_INIT_WORK;
+  window->State.IsFullscreen = GL_TRUE; //XXX Always fullscreen for now
 
   /* Create context */
   fghChooseConfig(&window->Window.pContext.egl.Config);