From: Stefanos A. Date: Tue, 14 Jan 2014 12:33:41 +0000 (+0100) Subject: [OpenTK] Respect a TargetUpdatePeriod of zero X-Git-Tag: 2.0-0~259^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95d71bc0ccc1b1ad25a9afda81b56efd9f14932c;p=platform%2Fcore%2Fcsapi%2Fopentk.git [OpenTK] Respect a TargetUpdatePeriod of zero --- diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index af55fe0..9200216 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -455,6 +455,15 @@ namespace OpenTK // Prepare for next loop elapsed = ClampElapsed(timestamp - update_timestamp); + + if (TargetUpdatePeriod <= Double.Epsilon) + { + // According to the TargetUpdatePeriod documentation, + // a TargetUpdatePeriod of zero means we will raise + // UpdateFrame events as fast as possible (one event + // per ProcessEvents() call) + break; + } } elapsed = ClampElapsed(timestamp - render_timestamp);