MapEditor.GraphicsDeviceServiceMiniMap.ResetDevice C# (CSharp) Method

ResetDevice() public method

Resets the graphics device to whichever is bigger out of the specified resolution or its current size. This behavior means the device will demand-grow to the largest of all its GraphicsDeviceControl clients.
public ResetDevice ( int width, int height ) : void
width int
height int
return void
        public void ResetDevice(int width, int height)
        {
            if (DeviceResetting != null)
                DeviceResetting(this, EventArgs.Empty);

            parameters.BackBufferWidth = Math.Max(parameters.BackBufferWidth, width);
            parameters.BackBufferHeight = Math.Max(parameters.BackBufferHeight, height);

            graphicsDevice.Reset(parameters);

            if (DeviceReset != null)
                DeviceReset(this, EventArgs.Empty);
        }