From 137d22b0b3dcb8204e5b55cbe9c49549064688fa Mon Sep 17 00:00:00 2001 From: Siyuan Miao Date: Thu, 11 Sep 2025 02:15:01 +0200 Subject: [PATCH] fix: use currentSession.reportHidRPCKeyboardMacroState --- jsonrpc.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jsonrpc.go b/jsonrpc.go index 32524bc5..7b2d0a25 100644 --- a/jsonrpc.go +++ b/jsonrpc.go @@ -1087,14 +1087,18 @@ func rpcExecuteKeyboardMacro(macro []hidrpc.KeyboardMacro) (usbgadget.KeysDownSt IsPaste: true, } - reportHidRPC(s, currentSession) + if currentSession != nil { + currentSession.reportHidRPCKeyboardMacroState(s) + } result, err := rpcDoExecuteKeyboardMacro(ctx, macro) setKeyboardMacroCancel(nil) s.State = false - reportHidRPC(s, currentSession) + if currentSession != nil { + currentSession.reportHidRPCKeyboardMacroState(s) + } return result, err }