Skip to content

Commit

Permalink
Merge pull request MonoGame#1728 from Nezz/w8_reschangedfix
Browse files Browse the repository at this point in the history
Fixed resolution change on Windows 8
  • Loading branch information
KonajuGames committed May 18, 2013
2 parents 9317140 + b317e56 commit abd93b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions MonoGame.Framework/Windows8/MetroGameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,16 @@ private void Window_SizeChanged(CoreWindow sender, WindowSizeChangedEventArgs ar

manager.GraphicsDevice.Viewport = new Viewport(0, 0, newWidth, newHeight);

// If we have a valid client bounds then
// update the graphics device.
if (_clientBounds.Width > 0 && _clientBounds.Height > 0)
manager.ApplyChanges();

// Set the new view state which will trigger the
// Game.ApplicationViewChanged event and signal
// the client size changed event.
Platform.ViewState = ApplicationView.Value;
OnClientSizeChanged();

// If we have a valid client bounds then
// update the graphics device.
if (_clientBounds.Width > 0 && _clientBounds.Height > 0)
manager.ApplyChanges();
}

private static DisplayOrientation ToOrientation(DisplayOrientations orientations)
Expand Down

0 comments on commit abd93b3

Please sign in to comment.