feat(macos): add gamepad support using libvirtualhid (#5807)

This commit is contained in:
Dave Lane authored and GitHub committed 2026-09-27 16:20:34 -04:00
1 parent c69d370c35
commit 8fc40974c9
34 files changed
+993 -296

No files matched your search

+5 -5
View File
@@ -1333,7 +1333,7 @@ namespace input {
* @param packet The controller arrival packet.
*/
void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_ARRIVAL_PACKET packet) {
if (!config::input.controller) {
if (!config::input.controller || config::input.gamepad_driver == config::GAMEPAD_DRIVER_NONE) {
return;
}
@@ -1483,7 +1483,7 @@ namespace input {
* @param packet The controller touch packet.
*/
void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_TOUCH_PACKET packet) {
if (!config::input.controller) {
if (!config::input.controller || config::input.gamepad_driver == config::GAMEPAD_DRIVER_NONE) {
return;
}
@@ -1516,7 +1516,7 @@ namespace input {
* @param packet The controller motion packet.
*/
void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_MOTION_PACKET packet) {
if (!config::input.controller) {
if (!config::input.controller || config::input.gamepad_driver == config::GAMEPAD_DRIVER_NONE) {
return;
}
@@ -1548,7 +1548,7 @@ namespace input {
* @param packet The controller battery packet.
*/
void passthrough(std::shared_ptr<input_t> &input, PSS_CONTROLLER_BATTERY_PACKET packet) {
if (!config::input.controller) {
if (!config::input.controller || config::input.gamepad_driver == config::GAMEPAD_DRIVER_NONE) {
return;
}
@@ -1579,7 +1579,7 @@ namespace input {
* @param packet Protocol packet being processed.
*/
void passthrough(std::shared_ptr<input_t> &input, PNV_MULTI_CONTROLLER_PACKET packet) {
if (!config::input.controller) {
if (!config::input.controller || config::input.gamepad_driver == config::GAMEPAD_DRIVER_NONE) {
return;
}