[GameWindow] Do not override Target*Frequency in GameWindow.Run()

This patch makes the following code work as expected:
```csharp
var gw = new GameWindow();
gw.TargetRenderFrequency = 60;
gw.Run();
```
Fixes issue #69
This commit is contained in:
thefiddler 2014-03-06 14:16:30 +01:00
parent 172462d4ea
commit 40a8a6d915

View file

@ -400,8 +400,14 @@ namespace OpenTK
throw new ArgumentOutOfRangeException("frames_per_second", frames_per_second,
"Parameter should be inside the range [0.0, 200.0]");
if (updates_per_second != 0)
{
TargetUpdateFrequency = updates_per_second;
}
if (frames_per_second != 0)
{
TargetRenderFrequency = frames_per_second;
}
Visible = true; // Make sure the GameWindow is visible.
OnLoadInternal(EventArgs.Empty);