fix vsync setting

This commit is contained in:
zeromus 2014-05-01 06:37:51 +00:00
parent a736f9576f
commit 358b9b9328
1 changed files with 9 additions and 1 deletions

View File

@ -359,7 +359,12 @@ TESTEROO:
//apply the vsync setting (should probably try to avoid repeating this)
bool vsync = Global.Config.VSyncThrottle || Global.Config.VSync;
//presentationPanel.GraphicsControl.SetVsync(vsync);
if (LastVsyncSetting != vsync || LastVsyncSettingGraphicsControl != presentationPanel.GraphicsControl)
{
presentationPanel.GraphicsControl.SetVsync(vsync);
LastVsyncSettingGraphicsControl = presentationPanel.GraphicsControl;
LastVsyncSetting = vsync;
}
//present and conclude drawing
presentationPanel.GraphicsControl.SwapBuffers();
@ -372,6 +377,9 @@ TESTEROO:
NeedsToPaint = false; //??
}
bool? LastVsyncSetting;
GraphicsControl LastVsyncSettingGraphicsControl;
Dictionary<string, DisplaySurface> MapNameToLuaSurface = new Dictionary<string,DisplaySurface>();
Dictionary<DisplaySurface, string> MapLuaSurfaceToName = new Dictionary<DisplaySurface, string>();
Dictionary<string, SwappableDisplaySurfaceSet> LuaSurfaceSets = new Dictionary<string, SwappableDisplaySurfaceSet>();