From 8f86fd4e04ddb4aab4767a935d2149b1503ea817 Mon Sep 17 00:00:00 2001 From: Allen Johnson-Weltzin Date: Mon, 31 Aug 2015 10:28:26 -0500 Subject: [PATCH] fix for keyboard LED operation --- hidboot.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hidboot.h b/hidboot.h index fb63ec5e..f0fa92ef 100644 --- a/hidboot.h +++ b/hidboot.h @@ -163,9 +163,12 @@ protected: break; } - if(old_keys != kbdLockingKeys.bLeds && hid) - return (hid->SetReport(0, 0/*hid->GetIface()*/, 2, 0, 1, &kbdLockingKeys.bLeds)); - + if(old_keys != kbdLockingKeys.bLeds && hid){ + uint8_t lockLeds = kbdLockingKeys.bLeds; + + return (hid->SetReport(0, 0/*hid->GetIface()*/, 2, 0, 1, &lockLeds)); + } + return 0; };