ocvalidate: Report dangerous key repeat values

This commit is contained in:
MikeBeaton 2021-04-03 20:29:45 +01:00
parent ccedcdc672
commit c46510f847

View File

@ -175,6 +175,20 @@ CheckUEFIAppleInput (
++ErrorCount;
}
if (UserUefi->Input.KeySupport
&& AsciiStrCmp (CustomDelays, "Disabled") != 0) {
if (UserUefi->AppleInput.KeyInitialDelay != 0
&& UserUefi->AppleInput.KeyInitialDelay < UserUefi->Input.KeyForgetThreshold) {
DEBUG ((DEBUG_WARN, "KeyInitialDelay is enabled in KeySupport mode, is non-zero and is below KeyForgetThreshold (likely to lead to uncontrolled key repeat, use 0 instead)!\n"));
++ErrorCount;
}
if (UserUefi->AppleInput.KeySubsequentDelay != 0
&& UserUefi->AppleInput.KeySubsequentDelay < UserUefi->Input.KeyForgetThreshold) {
DEBUG ((DEBUG_WARN, "KeySubsequentDelay is enabled in KeySupport mode and is below KeyForgetThreshold (likely to lead to uncontrolled key repeat, use KeyForgetThreshold value or above instead)!\n"));
++ErrorCount;
}
}
return ErrorCount;
}