-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IID for 'ISwapChainPanelNative' on UWP
- Loading branch information
1 parent
93ac8ef
commit da98a03
Showing
3 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
#if WINDOWS_UWP | ||
namespace ComputeSharp.Uwp.Helpers; | ||
#else | ||
namespace ComputeSharp.WinUI.Helpers; | ||
#endif | ||
|
||
/// <inheritdoc/> | ||
partial class SwapChainManager<TOwner> | ||
{ | ||
/// <summary> | ||
/// Gets the IID of <see cref="Win32.ISwapChainPanelNative"/>. | ||
/// </summary> | ||
private static unsafe Guid* IID_ISwapChainPanelNative | ||
{ | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
get | ||
{ | ||
ReadOnlySpan<byte> data = | ||
[ | ||
#if WINDOWS_UWP | ||
0xD2, 0x19, 0x2F, 0xF9, | ||
0xDE, 0x3A, | ||
0xA6, 0x45, | ||
0xA2, | ||
0x0C, | ||
0xF6, | ||
0xF1, | ||
0xEA, | ||
0x90, | ||
0x55, | ||
0x4B | ||
#else | ||
0xB8, 0xD0, 0xAA, 0x63, | ||
0x24, 0x7C, | ||
0xFF, 0x40, | ||
0x85, | ||
0xA8, | ||
0x64, | ||
0x0D, | ||
0x94, | ||
0x4C, | ||
0xC3, | ||
0x25 | ||
#endif | ||
]; | ||
|
||
return (Guid*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(data)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters