Merge UWP and WinUI 3 controls projects

このコミットが含まれているのは:
Sergio Pedri committed 2021-11-20 17:06:48 +01:00
1 親 d8a4a7412d
コミット bad1781f2b
18ファイル変更
+107 -999

検索条件に一致するファイルはありません

+13
ファイルの表示
@@ -1,8 +1,14 @@
using System;
#if !WINDOWS_UWP
using System.Runtime.InteropServices;
#endif
using System.Threading;
#if WINDOWS_UWP
namespace ComputeSharp.Uwp.Helpers;
#else
namespace ComputeSharp.WinUI.Helpers;
#endif
/// <summary>
/// A helper type that is responsible for applying dynamic resolution changes.
@@ -68,7 +74,14 @@ internal unsafe ref struct DynamicResolutionManager
manager.frameTimeOffset = 0;
manager.slidingFrameTimeWindowSum = TargetFrameTimeInTicksFor60fps * SlidingFrameTimeWindowLength;
#if WINDOWS_UWP
fixed (long* p = &manager.frameTimesInTicks[0])
{
new Span<long>(p, SlidingFrameTimeWindowLength).Fill(TargetFrameTimeInTicksFor60fps);
}
#else
MemoryMarshal.CreateSpan(ref manager.frameTimesInTicks[0], SlidingFrameTimeWindowLength).Fill(TargetFrameTimeInTicksFor60fps);
#endif
}
/// <summary>