# HG changeset patch # User Alys Brooks # Date 2022-11-14 06:30:25 # Node ID 93e94174536f38905d8b68cc1ab1a9b4c67d2cf5 # Parent 694fbc7e611e5ffb005dfaa710e19f0c34bba24d Fix crash caused by batch ending too early. diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -933,7 +933,6 @@ #endregion draw_header - batch.End(); #region window Menu.Render(debugWindow.monoFont, FNAGame.width, this.imGuiWindowBridgeEngine, ref quit, ref this.simulation.paused, ref this.simulation.currentRate, ref this.showBudget, header_left); @@ -946,6 +945,7 @@ { budgetWindow.draw(batch); } + batch.End(); #endregion budget @@ -999,7 +999,6 @@ stopWatch2.Start(); //Calcs for debug window: // past_draw.Enqueue(this.drawTime); - Logging.Spy(new {frame = this.frameCounter}); if (this.totalFrameCounter > 60 && ((this.frameCounter % 15) == 0)) { past_draw_millis.Add((float)this.drawTime.TotalMilliseconds); @@ -1099,6 +1098,8 @@ additionalInfo.Add("99.99%% draw", MathUtils.Percentile(past_draw_floats, 0.9999f).ToString()); } + additionalInfo.Add("Total frames", totalFrameCounter.ToString()); + debugWindow.Layout(debugInfo, additionalInfo, ref show_another_window); _imGuiRenderer.AfterLayout();