Esempio n. 1
0
 public static SwapEffect GetBestSwapEffectForPlatform(Version version = null)
 {
     if (version == null)
     {
         version = VersionHelpers.GetWindowsVersion();
     }
     if (version.Major > 6)
     {
         return(SwapEffect.FlipDiscard);                   // Win 10+
     }
     if ((version.Major > 5) && (version.Minor > 1))
     {
         return(SwapEffect.FlipSequential);                                            // 6.2+ - Win 8+
     }
     return(SwapEffect.Discard);
 }
Esempio n. 2
0
 public static int GetVariantForPlatform(Version platformVersion = null)
 {
     if (platformVersion == null)
     {
         platformVersion = VersionHelpers.GetWindowsVersion();
     }
     if (platformVersion.Major > 6)
     {
         return(2);
     }
     if (platformVersion.Major == 6)
     {
         if (platformVersion.Minor > 2)
         {
             return(2);
         }
         if (platformVersion.Minor > 1)
         {
             return(1);
         }
     }
     return(0);
 }