OSDN Git Service

起動時に例外が発生する不具合を修正。
authorFROM / Kenji Yamazaki <kumakamikoubou@gmail.com>
Mon, 5 Oct 2020 01:38:38 +0000 (10:38 +0900)
committerFROM / Kenji Yamazaki <kumakamikoubou@gmail.com>
Mon, 5 Oct 2020 01:38:38 +0000 (10:38 +0900)
起動処理の最中にウィンドウメッセージが発生し、その処理をしてしまっていたために発生。
そのため、起動処理が完了するまでは Update(), Draw() はスルーするように修正。

DTXManiaプロジェクト/コード/全体/CDTXMania.cs

index 34ecc44..047716f 100644 (file)
@@ -541,9 +541,14 @@ namespace DTXMania
                }
                protected override void Update( GameTime gameTime )
                {
+                       if( !this.b起動完了済み )
+                               return;
                }
                protected override void Draw( GameTime gameTime )
                {
+                       if( !this.b起動完了済み )
+                               return;
+
                        Sound管理.t再生中の処理をする();
 
                        if( Timer != null )
@@ -1979,6 +1984,7 @@ for (int i = 0; i < 3; i++) {
                        }
                }
                private CSound previewSound;
+               private bool b起動完了済み = false;
 
                private void t起動処理()
                {
@@ -2605,6 +2611,8 @@ for (int i = 0; i < 3; i++) {
                        r現在のステージ.On活性化();
                        //---------------------
                        #endregion
+
+                       this.b起動完了済み = true;
                }
 
                public void ShowWindowTitleWithSoundType()