mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 14:38:34 +01:00
added a handler for this
This commit is contained in:
parent
4325d51c95
commit
d224d57cf2
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
|
@ -17,6 +18,9 @@ namespace MLEM.Extensions {
|
|||
manager.PreferredBackBufferWidth = curr.Width;
|
||||
manager.PreferredBackBufferHeight = curr.Height;
|
||||
} else {
|
||||
if (lastWidth <= 0 || lastHeight <= 0)
|
||||
throw new InvalidOperationException("Can't call SetFullscreen to change out of fullscreen mode without going into fullscreen mode first");
|
||||
|
||||
manager.PreferredBackBufferWidth = lastWidth;
|
||||
manager.PreferredBackBufferHeight = lastHeight;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue