//* -----------------------------------------------------------------------* /// <summary> /// <para>解像度を自動で検索し、設定します。</para> /// <para>Windowsでは最小に、XBOX360では最大に設定します。</para> /// </summary> /// /// <param name="gdm">グラフィック デバイスの構成・管理クラス。</param> /// <param name="bWide">ワイド画面を優先して検索するかどうか。</param> /// <param name="bFullScreen">全画面モードにするかどうか。</param> /// <returns> /// 自動設定の結果が現在の設定と異なり、かつ設定完了した場合、<c>true</c>。 /// </returns> public static bool applyScreenChange(GraphicsDeviceManager gdm, bool bWide, bool bFullScreen) { bool bResult = false; EResolution resolution = CResolution.getMinResolution(bWide); if (bFullScreen) { resolution = supports.prev(CResolution.getMaxResolution(bWide)); } Rectangle screenRect = resolution.toRect(); bResult = (gdm.IsFullScreen != bFullScreen) || (gdm.PreferredBackBufferWidth != screenRect.Width) || (gdm.PreferredBackBufferHeight != screenRect.Height); if (bResult) { gdm.IsFullScreen = bFullScreen; gdm.PreferredBackBufferWidth = screenRect.Width; gdm.PreferredBackBufferHeight = screenRect.Height; gdm.ApplyChanges(); } return(bResult); }
//* ────────────-_______________________* //* constructor & destructor ───────────────────────* //* -----------------------------------------------------------------------* /// <summary>コンストラクタ。</summary> public CSprite() { resolution = new CResolution(); }