Exemplo n.º 1
0
 public void OnLostDevice()
 {
     if (_font.OnLostDevice() != ResultCode.Success)
     {
         Debugger.Break();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Just ensures that the surface we created is cleaned up.
        /// </summary>
        public override void Cleanup()
        {
            DebugMessage("Cleanup");
            try
            {
                lock (_lockRenderTarget)
                {
                    if (_renderTarget != null)
                    {
                        _renderTarget.Dispose();
                        _renderTarget = null;
                    }

                    if (_renderTarget0 != null)
                    {
                        _renderTarget0.Dispose();
                        _renderTarget0 = null;
                    }

                    Request = null;

                    if (bitmap != null)
                    {
                        bitmap.Dispose();
                        bitmap = null;
                    }

                    if (_font != null)
                    {
                        _font.OnLostDevice();
                        _font.Dispose();
                        _font = null;
                    }

                    if (_sprite != null)
                    {
                        _sprite.Dispose();
                        _sprite = null;
                    }

                    screenWidth = screenHeight = 0;
                }
            }
            catch
            {
            }
        }
Exemplo n.º 3
0
 public void OnLostDevice()
 {
     fontSprite.OnLostDevice();
     font.OnLostDevice();
 }
Exemplo n.º 4
0
 public void UnloadContent()
 {
     font.OnLostDevice();
     sprite.OnLostDevice();
 }