Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CodeGen/src/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,23 @@ def parse_func(f, interface, func):
if c:
g_Output.append("\t\t/// <para>" + c + "</para>")
g_Output.append("\t\t/// </summary>")

strAsyncType: str = None
strAsyncStruct: str = None

for attr in func.attributes:
if attr.name in ("STEAM_CALL_RESULT", "STEAM_CALL_BACK"):
if attr.name == "STEAM_CALL_RESULT":
strAsyncType = "CallResult"
elif attr.name == "STEAM_CALL_BACK":
strAsyncType = "Callback"
strAsyncStruct = attr.value


if strAsyncType is not None:
g_Output.append(f"\t\t[SteamHasAsync{strAsyncType}(typeof({strAsyncStruct}))]")


g_Output.append("\t\tpublic static " + wrapperreturntype + " " + func.name.rstrip("0") + "(" + wrapperargs + ") {")

g_Output.extend(functionBody)
Expand Down