mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-23 19:51:17 +00:00
Passing null to ChangeResolution will restore the original resolution.
This commit is contained in:
parent
eaaf67d903
commit
539370d4b7
|
@ -189,10 +189,12 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>Changes the resolution of the DisplayDevice.</summary>
|
/// <summary>Changes the resolution of the DisplayDevice.</summary>
|
||||||
/// <param name="resolution">The resolution to set. <see cref="DisplayDevice.SelectResolution"/></param>
|
/// <param name="resolution">The resolution to set. <see cref="DisplayDevice.SelectResolution"/></param>
|
||||||
/// <exception cref="GraphicsModeException">Thrown if the requested resolution could not be set.</exception>
|
/// <exception cref="GraphicsModeException">Thrown if the requested resolution could not be set.</exception>
|
||||||
|
/// <remarks>If the specified resolution is null, this function will restore the original DisplayResolution.</remarks>
|
||||||
public void ChangeResolution(DisplayResolution resolution)
|
public void ChangeResolution(DisplayResolution resolution)
|
||||||
{
|
{
|
||||||
if (resolution == null)
|
if (resolution == null)
|
||||||
throw new ArgumentNullException("resolution", "Must be a valid resolution.");
|
this.RestoreResolution();
|
||||||
|
|
||||||
if (resolution == current_resolution)
|
if (resolution == current_resolution)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue