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:
+1
-1
@@ -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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user