I’m trying to write a game using steamworks, based on provided example SpaceWars. But there is not mouse action support, and i failed to introduce it. I rewrote steam_controller.vdf, added action handlers, but nothing works. Functions like SteamInput( )->GetDigitalActionData() always return false and SteamInput( )->GetConnectedControllers return 0, so it does not recognize mouse at all. What is the correct way to deal with mouse actions?
my .vdf file
"controller_mappings"
{
"version" "8"
"title" "#title"
"description" "#description"
"controller_type" "controller_steamcontroller_gordon"
"Timestamp" "1529529957"
"actions"
{
"Mouse"
{
"title" "#Set_Mouse"
"legacy_set" "0"
"StickPadGyro"
{
"Cursor"
{
"title" "#Action_Cursor"
"input_mode" "absolute_mouse"
"os_mouse" "1"
}
}
"Button"
{
"scroll_up" "#Action_ScrollUp"
"scroll_down" "#Action_ScrollDown"
"mouse_lmb" "#Action_LMB"
"mouse_rmb" "#Action_RMB"
"mouse_mmb" "#Action_MMB"
}
}
}
"action_layers"
{
}
"localization"
{
"english"
{
"Action_ScrollUp" "ScrollUp"
"Action_ScrollDown" "ScrollDown"
"Action_LMB" "MouseLMB"
"Action_RMB" "MouseRMB"
"Action_MMB" "MouseMMB"
}
}
}
in GameEngine i have
enum ECONTROLLERDIGITALACTION
{
eControllerDigitalAction_LMB_Pressed,
eControllerDigitalAction_RMB_Pressed,
eControllerDigitalAction_MMB_Pressed,
}
and register them as
m_ControllerDigitalActionHandles[eControllerDigitalAction_LMB_Pressed] = SteamInput()->GetDigitalActionHandle("mouse_lmb");
m_ControllerDigitalActionHandles[eControllerDigitalAction_RMB_Pressed] = SteamInput()->GetDigitalActionHandle("mouse_rmb");
m_ControllerDigitalActionHandles[eControllerDigitalAction_MMB_Pressed] = SteamInput()->GetDigitalActionHandle("mouse_mmb");
but
m_pGameEngine->BIsControllerActionActive(ECONTROLLERDIGITALACTION::eControllerDigitalAction_LMB_Pressed);
always returns false. What should i do?