diff --git a/FnaPlugin/RenderWindow.cs b/FnaPlugin/RenderWindow.cs
index 7b923c9..d603768 100644
--- a/FnaPlugin/RenderWindow.cs
+++ b/FnaPlugin/RenderWindow.cs
@@ -177,6 +177,11 @@ protected override void UnloadContent()
Content.Unload();
}
+ ///
+ /// Stores the round id of the latest render cycle
+ ///
+ private int? latestRenderedRound;
+
///
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
@@ -189,6 +194,14 @@ protected override void Update(GameTime gameTime)
playgroundWidth = CurrentState.PlaygroundWidth / 2;
playgroundHeight = CurrentState.PlaygroundHeight / 2;
camera.Resize(CurrentState.PlaygroundWidth, CurrentState.PlaygroundHeight);
+
+ // Detect new round to reset debug messages
+ if (!latestRenderedRound.HasValue || latestRenderedRound > CurrentState.CurrentRound)
+ {
+ debugMessages.Clear();
+ }
+
+ latestRenderedRound = CurrentState.CurrentRound;
}
var ks = Keyboard.GetState();