fix: use currentSession.reportHidRPCKeyboardMacroState

This commit is contained in:
Siyuan Miao 2025-09-11 02:15:01 +02:00
parent d6de9668bd
commit 137d22b0b3
1 changed files with 6 additions and 2 deletions

View File

@ -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
}