Skip to content

Commit

Permalink
Fixed DrawingSurfaceBackgroundGrid in Game.xaml
Browse files Browse the repository at this point in the history
credit to nZeus/MonoGame, fixes issue with functions not being called in WP8 builds.
  • Loading branch information
RTLShadow committed Feb 8, 2014
1 parent 813750a commit 88c7521
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MonoGame.Framework/WindowsPhone/XamlGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ static public T Create(string launchParameters, PhoneApplicationPage page)
mediaElement = (MediaElement)child;
else if (drawingSurface == null && child is DrawingSurface)
drawingSurface = (DrawingSurface)child;
else if (drawingSurface == null && child is DrawingSurfaceBackgroundGrid)
drawingSurface = (DrawingSurfaceBackgroundGrid)child;
}

if (!(drawingSurface is DrawingSurfaceBackgroundGrid) && !(drawingSurface is DrawingSurface))
Expand Down Expand Up @@ -194,4 +196,4 @@ private static void OnDrawingSurfaceUnloaded(object sender, RoutedEventArgs e)
initializedSurfaces.Remove(drawingSurface);
}
}
}
}

0 comments on commit 88c7521

Please sign in to comment.