From 0a8b992268608e28134d01268fed00f2031ef9af Mon Sep 17 00:00:00 2001 From: portersky Date: Sat, 29 Aug 2026 14:00:00 +0200 Subject: [PATCH] fix: power on GIP controllers Send GIP_PWR_ON when a controller is identified, matching the upstream gamepad probe before authentication and input initialization. Co-Authored-By: openai/gpt-5.6-luna: matched controller power-up flow --- CMakeLists.txt | 2 +- src/app/api.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0d7faa..ed74616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ if(NOT CMAKE_GENERATOR MATCHES "^(Ninja|Xcode)$") endif() cmake_minimum_required(VERSION 3.21) -project(xone_macos VERSION 0.1.14 LANGUAGES CXX Swift) +project(xone_macos VERSION 0.1.15 LANGUAGES CXX Swift) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/src/app/api.cpp b/src/app/api.cpp index 74c2720..174d637 100644 --- a/src/app/api.cpp +++ b/src/app/api.cpp @@ -173,8 +173,14 @@ auto controller_transport::set_encryption_key( return chip_.set_client_key(wcid_, key); } -auto controller_listener::on_client_added(xone::gip::client&) -> void +auto controller_listener::on_client_added(xone::gip::client& client) -> void { + if (auto err = client.set_power_mode(xone::gip::GIP_PWR_ON); err != 0) { + xone::log_msg(xone::log_level::warn, + "api: controller power-on failed (%d)", err); + return; + } + std::lock_guard guard(dongle_.lock); controller_.gip_ready = true; xone::log_msg(xone::log_level::info,