-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91908 from carlossanlop/release/6.0-staging
[manual] Merge release/6.0-staging into release/6.0
- Loading branch information
Showing
15 changed files
with
185 additions
and
39 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
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
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
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
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
63 changes: 63 additions & 0 deletions
63
src/tests/Interop/StructMarshalling/PInvoke/GameControllerButtonBind.cs
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,63 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
|
||
public unsafe partial struct GameControllerButtonBind | ||
{ | ||
public GameControllerButtonBind | ||
( | ||
GameControllerBindType? bindType = null, | ||
GameControllerButtonBindValue? value = null | ||
) : this() | ||
{ | ||
if (bindType is not null) | ||
{ | ||
BindType = bindType.Value; | ||
} | ||
|
||
if (value is not null) | ||
{ | ||
Value = value.Value; | ||
} | ||
} | ||
|
||
public GameControllerBindType BindType; | ||
|
||
public GameControllerButtonBindValue Value; | ||
} | ||
|
||
public enum GameControllerBindType : int | ||
{ | ||
ControllerBindtypeNone = 0x0, | ||
ControllerBindtypeButton = 0x1, | ||
ControllerBindtypeAxis = 0x2, | ||
ControllerBindtypeHat = 0x3, | ||
None = 0x0, | ||
Button = 0x1, | ||
Axis = 0x2, | ||
Hat = 0x3, | ||
} | ||
|
||
[StructLayout(LayoutKind.Explicit)] | ||
public unsafe partial struct GameControllerButtonBindValue | ||
{ | ||
[FieldOffset(0)] | ||
public int Button; | ||
|
||
[FieldOffset(0)] | ||
public int Axis; | ||
|
||
[FieldOffset(0)] | ||
public GameControllerButtonBindValueHat Hat; | ||
} | ||
|
||
public unsafe partial struct GameControllerButtonBindValueHat | ||
{ | ||
public int Hat; | ||
|
||
public int HatMask; | ||
} |
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
Oops, something went wrong.