XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

LogiBoardToolBox

【WinUI】罗技鼠标板载驱动程序

公开
关注 0 Fork 0 Star 0
UTF-8
namespace LogiBoardToolBox.Core.HidPlusPlus;

internal static class OnboardModeTransition
{
    public static async Task StopButtonSpyAsync(HidPlusPlusClient client, CancellationToken ct)
    {
        // G HUB stops device-side button reporting before entering onboard mode.
        // Its state can outlive the application that started it, so disposing only
        // our own HostMacroSession does not complete the handoff.
        var spy = await client.GetFeatureAsync(0x8110, ct).ConfigureAwait(false);
        if (spy != 0) await client.CallAsync(spy, 2, cancellationToken: ct).ConfigureAwait(false);
    }
}