/// <summary>
        /// Reset all properties to their default values.
        /// </summary>
        public void Clear()
        {
            backBufferFormat = SurfaceFormat.Color;
#if IOS
            // Mainscreen.Bounds does not account for the device's orientation. it ALWAYS assumes portrait
            var width  = (int)(UIScreen.MainScreen.Bounds.Width * UIScreen.MainScreen.Scale);
            var height = (int)(UIScreen.MainScreen.Bounds.Height * UIScreen.MainScreen.Scale);

            // Flip the dimensions if we need to.
            if (TouchPanel.DisplayOrientation == DisplayOrientation.LandscapeLeft ||
                TouchPanel.DisplayOrientation == DisplayOrientation.LandscapeRight)
            {
                width  = height;
                height = (int)(UIScreen.MainScreen.Bounds.Width * UIScreen.MainScreen.Scale);
            }

            backBufferWidth  = width;
            backBufferHeight = height;
#else
            backBufferWidth  = GraphicsDeviceManager.DefaultBackBufferWidth;
            backBufferHeight = GraphicsDeviceManager.DefaultBackBufferHeight;
#endif
            deviceWindowHandle = IntPtr.Zero;
#if IOS && !TVOS
            isFullScreen = UIApplication.SharedApplication.StatusBarHidden;
#else
            // isFullScreen = false;
#endif
            depthStencilFormat   = DepthFormat.None;
            multiSampleCount     = 0;
            PresentationInterval = PresentInterval.Default;
            DisplayOrientation   = Microsoft.Xna.Framework.DisplayOrientation.Default;
        }
Exemplo n.º 2
0
 private MouseCursor(IntPtr handle)
 {
     Handle = handle;
 }
Exemplo n.º 3
0
 private static void PlatformSetWindowHandle(IntPtr windowHandle)
 {
 }