コード例 #1
0
ファイル: Runner.cs プロジェクト: SweetTini/FrogWorks
 protected Runner(int width, int height, int scale, bool fullscreen)
 {
     Application = this;
     Size        = new Point(width, height).Abs();
     Game        = new GameAdapter(this);
     Display     = new DisplayAdapter(Game, Size, scale, fullscreen);
 }
コード例 #2
0
ファイル: DisplayAdapter.cs プロジェクト: SweetTini/FrogWorks
        internal DisplayAdapter(GameAdapter game, Point size, int scale, bool fullscreen)
        {
            _game = game;
            _game.Graphics.DeviceCreated   += OnDeviceChanged;
            _game.Window.ClientSizeChanged += OnDeviceChanged;
            _size = size;

            if (fullscreen)
            {
                ToFullscreen();
            }
            else
            {
                ToFixedScale(scale);
            }

            _game.ApplyChanges();
            _batch = new RendererBatch(_game.GraphicsDevice);
        }