diff --git a/app/src/main/cpp/skyline/input/npad.h b/app/src/main/cpp/skyline/input/npad.h index 35391061..d3b9e129 100644 --- a/app/src/main/cpp/skyline/input/npad.h +++ b/app/src/main/cpp/skyline/input/npad.h @@ -83,7 +83,7 @@ namespace skyline::input { /** * @brief Checks if the NpadId is valid */ - bool IsNpadIdValid(NpadId id) { + static bool IsNpadIdValid(NpadId id) { switch (id) { case NpadId::Player1: case NpadId::Player2: diff --git a/app/src/main/cpp/skyline/services/hid/IActiveVibrationDeviceList.cpp b/app/src/main/cpp/skyline/services/hid/IActiveVibrationDeviceList.cpp index f79109b9..98b1f0a0 100644 --- a/app/src/main/cpp/skyline/services/hid/IActiveVibrationDeviceList.cpp +++ b/app/src/main/cpp/skyline/services/hid/IActiveVibrationDeviceList.cpp @@ -12,8 +12,9 @@ namespace skyline::service::hid { Result IActiveVibrationDeviceList::ActivateVibrationDevice(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { auto handle{request.Pop()}; - if (!handle.isRight) - state.input->npad.at(handle.id).vibrationRight = NpadVibrationValue{}; + if (NpadManager::IsNpadIdValid(handle.id)) + if (!handle.isRight) + state.input->npad.at(handle.id).vibrationRight = NpadVibrationValue{}; return {}; }