OSDN Git Service

#23568 ウインドウ非フォーカス時のsleep値可変化に際して、VSyncWait=ON時はsleepしないよう追加修正
authoryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Wed, 3 Nov 2010 17:01:06 +0000 (17:01 +0000)
committeryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Wed, 3 Nov 2010 17:01:06 +0000 (17:01 +0000)
git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@11 16f42ceb-6dc6-49c8-ba94-f2d53467949d

FDK17プロジェクト/コード/01.フレームワーク/Rendering/GraphicsDeviceManager.cs

index 8774db9..ed6c858 100644 (file)
@@ -419,7 +419,7 @@ namespace SampleFramework
 //            if (!game.IsActive || deviceLost)                // #23568 2010.11.3 yyagi: separate conditions to support valiable sleep value when !IsActive.\r
                        if (deviceLost)\r
                                Thread.Sleep(50);\r
-                       else if (!game.IsActive)\r
+                       else if (!game.IsActive && !this.CurrentSettings.EnableVSync)   // #23568 2010.11.4 yyagi: Don't add sleep() while VSync is enabled.\r
                                Thread.Sleep(this.game.InactiveSleepTime.Milliseconds);\r
 \r
             if (deviceLost)\r