Skip to content

Commit

Permalink
Fix interop gen for arrays of structs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomspilman committed Sep 24, 2024
1 parent c864dea commit ae17ac6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tools/MonoGame.Generator.CTypes/StructWritter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ private static bool IsValid(Type type)

public bool TryAppend(Type type)
{
if (type.ToString().Contains("MGG_InputElement"))
type = type;

if (type.IsArray)
type = type.GetElementType();

if (type.IsPointer || type.IsByRef)
{
type = type.GetElementType();
Expand Down

0 comments on commit ae17ac6

Please sign in to comment.