private static void OpenVoiceSettingsCallbackImpl(IntPtr ptr, Result result) { GCHandle h = GCHandle.FromIntPtr(ptr); OpenVoiceSettingsHandler callback = (OpenVoiceSettingsHandler)h.Target; h.Free(); callback(result); }
/// <summary> /// Opens the overlay widget for voice settings for the currently connected application. These settings are unique to /// each user within the context of your application. /// That means that a user can have different favorite voice settings for each of their games! /// </summary> /// <param name="callback"></param> public void OpenVoiceSettings(OpenVoiceSettingsHandler callback) { GCHandle wrapped = GCHandle.Alloc(callback); Methods.OpenVoiceSettings(methodsPtr, GCHandle.ToIntPtr(wrapped), OpenVoiceSettingsCallbackImpl); }