Set original_resolution to null after a successful call to RestoreResolution().

This commit is contained in:
the_fiddler 2008-01-26 11:02:49 +00:00
parent 58ae48833c
commit 6f07dd23f1

View file

@ -211,7 +211,10 @@ namespace OpenTK.Graphics
{ {
if (original_resolution != null) if (original_resolution != null)
if (implementation.TryRestoreResolution(this)) if (implementation.TryRestoreResolution(this))
{
current_resolution = original_resolution; current_resolution = original_resolution;
original_resolution = null;
}
else throw new GraphicsModeException(String.Format("Device {0}: Failed to restore resolution.", this)); else throw new GraphicsModeException(String.Format("Device {0}: Failed to restore resolution.", this));
} }