Hot swapping/plugging controllers now working. Refresh action sets of all active controllers. Release Build 8298.
This commit is contained in:
parent
8f17c3b0fc
commit
3d621fa95b
@ -353,7 +353,7 @@ bool AiL::OnUserUpdate(float fElapsedTime){
|
|||||||
Input::ingameControlsHandle=SteamInput()->GetActionSetHandle("InGameControls");
|
Input::ingameControlsHandle=SteamInput()->GetActionSetHandle("InGameControls");
|
||||||
Input::menuControlsHandle=SteamInput()->GetActionSetHandle("MenuControls");
|
Input::menuControlsHandle=SteamInput()->GetActionSetHandle("MenuControls");
|
||||||
}
|
}
|
||||||
SteamInput()->ActivateActionSet(STEAM_INPUT_HANDLE_ALL_CONTROLLERS,Input::menuControlsHandle);
|
ActivateActionSetForAllControllers(Input::menuControlsHandle);
|
||||||
Input::UpdateSteamInput();
|
Input::UpdateSteamInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,7 +434,7 @@ bool AiL::DownPressed(){
|
|||||||
|
|
||||||
void AiL::HandleUserInput(float fElapsedTime){
|
void AiL::HandleUserInput(float fElapsedTime){
|
||||||
if(!Menu::stack.empty())return; //A window being opened means there's no user input allowed.
|
if(!Menu::stack.empty())return; //A window being opened means there's no user input allowed.
|
||||||
if(SteamInput())SteamInput()->ActivateActionSet(STEAM_INPUT_HANDLE_ALL_CONTROLLERS,Input::ingameControlsHandle);
|
if(SteamInput())ActivateActionSetForAllControllers(Input::ingameControlsHandle);
|
||||||
|
|
||||||
if(GetKey(SCROLL).bPressed)displayHud=!displayHud;
|
if(GetKey(SCROLL).bPressed)displayHud=!displayHud;
|
||||||
|
|
||||||
@ -3796,4 +3796,10 @@ bool AiL::Steam_Init(){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AiL::ActivateActionSetForAllControllers(InputActionSetHandle_t actionSetHandle){
|
||||||
|
for(int i=0;i<Input::controllerCount;i++){
|
||||||
|
SteamInput()->ActivateActionSet(Input::steamControllers[i],Input::menuControlsHandle);
|
||||||
|
}
|
||||||
}
|
}
|
@ -304,6 +304,7 @@ public:
|
|||||||
rcode LoadResource(Renderable&renderable,std::string_view imgPath,bool filter=false,bool clamp=true);
|
rcode LoadResource(Renderable&renderable,std::string_view imgPath,bool filter=false,bool clamp=true);
|
||||||
void UpdateMonsters();
|
void UpdateMonsters();
|
||||||
bool Steam_Init();
|
bool Steam_Init();
|
||||||
|
void ActivateActionSetForAllControllers(InputActionSetHandle_t actionSetHandle);
|
||||||
|
|
||||||
struct TileGroupData{
|
struct TileGroupData{
|
||||||
vi2d tilePos;
|
vi2d tilePos;
|
||||||
|
@ -197,6 +197,7 @@ void Input::UpdateSteamInput(){
|
|||||||
InputDigitalActionHandle_t inputHnd=SteamInput()->GetDigitalActionHandle(data.first.c_str());
|
InputDigitalActionHandle_t inputHnd=SteamInput()->GetDigitalActionHandle(data.first.c_str());
|
||||||
InputDigitalActionData_t buttonData=SteamInput()->GetDigitalActionData(steamControllers[i],inputHnd);
|
InputDigitalActionData_t buttonData=SteamInput()->GetDigitalActionData(steamControllers[i],inputHnd);
|
||||||
if(!buttonData.bActive)continue; //Ignore inputs that are not active.
|
if(!buttonData.bActive)continue; //Ignore inputs that are not active.
|
||||||
|
if(buttonData.bActive){std::cout<<input<<" is active"<<std::endl;}
|
||||||
data.second.bPressed=data.second.bReleased=false;
|
data.second.bPressed=data.second.bReleased=false;
|
||||||
|
|
||||||
if(!data.second.bHeld&&buttonData.bState){
|
if(!data.second.bHeld&&buttonData.bState){
|
||||||
|
@ -46,4 +46,6 @@ Make another actions config file for the main build
|
|||||||
Sword attack should linger
|
Sword attack should linger
|
||||||
Add game file debug logging
|
Add game file debug logging
|
||||||
|
|
||||||
Automatically pause if controller is disconnected (while using a controller)
|
Automatically pause if controller is disconnected (while using a controller)
|
||||||
|
|
||||||
|
PS5 LED color support
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 5
|
#define VERSION_MINOR 5
|
||||||
#define VERSION_PATCH 1
|
#define VERSION_PATCH 1
|
||||||
#define VERSION_BUILD 8293
|
#define VERSION_BUILD 8298
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user