Browse Source

[xna][monogame] Fixed examples using incorrect time update, leading to jittery playback. Closes #1868.

Harald Csaszar 4 years ago
parent
commit
1057889c21
2 changed files with 2 additions and 2 deletions
  1. 1 1
      spine-monogame/example/ExampleGame.cs
  2. 1 1
      spine-xna/example/src/ExampleGame.cs

+ 1 - 1
spine-monogame/example/ExampleGame.cs

@@ -294,7 +294,7 @@ namespace Spine {
 		}
 		}
 
 
 		protected override void Draw(GameTime gameTime) {
 		protected override void Draw(GameTime gameTime) {
-			currentScreen.Render(gameTime.ElapsedGameTime.Milliseconds / 1000.0f);
+			currentScreen.Render((float)(gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0));
 		}
 		}
 	}
 	}
 }
 }

+ 1 - 1
spine-xna/example/src/ExampleGame.cs

@@ -192,7 +192,7 @@ namespace Spine {
 		protected override void Draw (GameTime gameTime) {
 		protected override void Draw (GameTime gameTime) {
 			GraphicsDevice.Clear(Color.Black);
 			GraphicsDevice.Clear(Color.Black);
 
 
-			state.Update(gameTime.ElapsedGameTime.Milliseconds / 1000f);
+			state.Update((float)(gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0));
 			state.Apply(skeleton);
 			state.Apply(skeleton);
 			skeleton.UpdateWorldTransform();
 			skeleton.UpdateWorldTransform();
 			if (skeletonRenderer.Effect is BasicEffect) {
 			if (skeletonRenderer.Effect is BasicEffect) {