private static void OnServer(IntPtr thisptr, IntPtr pvParam) { Action <MusicPlayerWantsVolume_t> action = MusicPlayerWantsVolume_t.actionServer; if (action != null) { action(MusicPlayerWantsVolume_t.Fill(pvParam)); } else { } }
public static async Task <MusicPlayerWantsVolume_t?> GetResultAsync(SteamAPICall_t handle) { MusicPlayerWantsVolume_t?nullable; bool flag = false; while (!SteamUtils.IsCallComplete(handle, out flag)) { await Task.Delay(1); if ((SteamClient.IsValid ? false : !SteamServer.IsValid)) { nullable = null; return(nullable); } } if (!flag) { IntPtr intPtr = Marshal.AllocHGlobal(MusicPlayerWantsVolume_t.StructSize); try { if (!(!SteamUtils.Internal.GetAPICallResult(handle, intPtr, MusicPlayerWantsVolume_t.StructSize, 4011, ref flag) | flag)) { nullable = new MusicPlayerWantsVolume_t?(MusicPlayerWantsVolume_t.Fill(intPtr)); } else { nullable = null; } } finally { Marshal.FreeHGlobal(intPtr); } } else { nullable = null; } return(nullable); }