Permalink
Browse files

[OpenTK] Do not raise *Frame events when time = 0

Affects issue #40
  • Loading branch information...
1 parent bcc2405 commit 7f64945079866db5c492c405b6f3c88ec022519e @thefiddler thefiddler committed Jan 8, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/OpenTK/GameWindow.cs
@@ -469,7 +469,7 @@ void DispatchUpdateAndRenderFrame(object sender, EventArgs e)
bool RaiseUpdateFrame(double time)
{
- if (time >= TargetUpdatePeriod)
+ if (time > 0 && time >= TargetUpdatePeriod)
{
update_args.Time = time;
OnUpdateFrameInternal(update_args);
@@ -481,7 +481,7 @@ bool RaiseUpdateFrame(double time)
bool RaiseRenderFrame(double time)
{
- if (time >= TargetRenderPeriod)
+ if (time > 0 && time >= TargetRenderPeriod)
{
render_args.Time = time;
OnRenderFrameInternal(render_args);

0 comments on commit 7f64945

Please sign in to comment.