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
This commit is contained in:
portersky
2026-08-29 14:00:00 +02:00
parent 1bcb038785
commit 0a8b992268
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -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)
+7 -1
View File
@@ -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<std::mutex> guard(dongle_.lock);
controller_.gip_ready = true;
xone::log_msg(xone::log_level::info,