Skip to content

Commit

Permalink
YogaHIDD: fix button load method to enable HID power button
Browse files Browse the repository at this point in the history
  • Loading branch information
zhen-zen authored May 5, 2024
1 parent 8b9de69 commit 5865e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YogaSMC/YogaVPC/YogaHIDD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ IOReturn YogaHIDD::evaluateHIDD(intel_hid_dsm_fn_codes index, UInt64 *value, SIn
OSObject *obj = nullptr;
if (fn_mask & BIT(index)) {
OSArray *arr = nullptr;
if (arg > 0) {
if (arg >= 0) {
arr = OSArray::withCapacity(1);
OSNumber *val = OSNumber::withNumber(arg, 32);
arr->setObject(val);
Expand All @@ -274,7 +274,7 @@ IOReturn YogaHIDD::evaluateHIDD(intel_hid_dsm_fn_codes index, UInt64 *value, SIn
ret = evaluateDSM(index, &obj, arr);
OSSafeReleaseNULL(arr);
} else {
if (arg > 0) {
if (arg >= 0) {
OSObject *params[] = {
OSNumber::withNumber(arg, 32),
};
Expand Down

0 comments on commit 5865e89

Please sign in to comment.