forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DX] Improve window handling (MonoGame#5585)
* [DX] Improve window handling * Update back buffer size when switching to full screen * Fix dirty flag on early exit in GDM.ApplyChanges * Restore full screen after minimizing the window * Allow mode switching from the start * Fix DesktopGL build * Fix ClientSize raised before back buffer resize * Ignore resize events after switching soft full screen * VS done too much renamin' * Fix UWP build * Fix intializing in soft full screen mode * Resizing in hw full screen and cleanup things a bit * Fix hard full screen on startup and disposal Hardware full screen failed when set in the game constructor because there was no swapchain yet to get the output from. If there is no swapchain yet, the current method gets the primary output by enumerating adapters and getting the first, then getting the first output from that adapter. When exiting a game while in full screen I sometimes got stuck with a black screen. That was fixed by making sure we exit full screen when disposing a GraphicsDevice. * Remove unused event * Clamp backbuffer size to display size * Make OnPresentationChanged for WinForms internal * Fix DesktopGL build * Fix Web build * Fix mobile build * Only correct back buffer size for desktop platforms * Don't change DesktopGL to make this more mergeable * Don't limit back buffer size * Update Adapter when display changes Added a check after a window is moved (or resized) that updates the GraphicsAdapter of the GraphicsDevice to the adapter that is rendering the display that the window is on (because that might have changed). * Detect window size change through Win10 hotkeys * Catch ContainingOutput exception on headless devices * Don't center window after move with hotkeys * Fix resize through code raising ClientSizeChanged
- Loading branch information
1 parent
e2cb5dd
commit 1a9466e
Showing
15 changed files
with
385 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// MonoGame - Copyright (C) The MonoGame Team | ||
// This file is subject to the terms and conditions defined in | ||
// file 'LICENSE.txt', which is part of this source code package. | ||
|
||
using System; | ||
|
||
namespace Microsoft.Xna.Framework.Graphics | ||
{ | ||
internal class PresentationEventArgs : EventArgs | ||
{ | ||
public PresentationParameters PresentationParameters { get; private set; } | ||
|
||
public PresentationEventArgs(PresentationParameters presentationParameters) | ||
{ | ||
PresentationParameters = presentationParameters; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.