Make function signatures readable

This commit is contained in:
Isaac Marovitz 2024-06-21 12:49:55 +01:00
parent edc41dfb13
commit feb68231b3
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1

View file

@ -169,7 +169,10 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
}
}
return $"{funcKeyword} {returnType} {funcName ?? function.Name}({string.Join(", ", args)})";
var funcPrefix = $"{funcKeyword} {returnType} {funcName ?? function.Name}(";
var indent = new string(' ', funcPrefix.Length);
return $"{funcPrefix}{string.Join($", \n{indent}", args)})";
}
private static void PrintBlock(CodeGenContext context, AstBlock block, bool isMainFunction)