From ee4722cb3375667c3fef0740469599d4a6bdce59 Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Sat, 14 Sep 2019 18:32:26 -0400 Subject: [PATCH] Activate the action set if there is only one present. --- dll/steam_controller.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dll/steam_controller.h b/dll/steam_controller.h index 6aa33aa0..0f2b6411 100644 --- a/dll/steam_controller.h +++ b/dll/steam_controller.h @@ -232,7 +232,14 @@ bool Init() GamepadUpdate(); for (int i = 1; i < 5; ++i) { - controllers.insert(std::pair(i, Controller_Action(i))); + struct Controller_Action cont_action(i); + //Activate the action set if there is only one present. + //TODO: I don't know if one gets activated by default when there's more than one + if (action_handles.size() == 1) { + cont_action.activate_action_set(action_handles.begin()->second, controller_maps); + } + + controllers.insert(std::pair(i, cont_action)); } return true;