MCPcopy Create free account
hub / github.com/TurningWheel/Barony / getController

Method getController

src/player.cpp:6264–6284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6262}
6263
6264GameController* Inputs::getController(int player) const
6265{
6266 if ( player < 0 || player >= MAXPLAYERS )
6267 {
6268 printlog("[INPUTS]: Warning: player index %d out of range.", player);
6269 return nullptr;
6270 }
6271 /*if ( !hasController(player) )
6272 {
6273 return nullptr;
6274 }*/
6275
6276 for ( auto& controller : game_controllers )
6277 {
6278 if ( controller.getID() == getControllerID(player) )
6279 {
6280 return &controller;
6281 }
6282 }
6283 return nullptr;
6284}
6285
6286const bool Inputs::bControllerRawInputPressed(int player, const unsigned button) const
6287{

Callers 15

handleGhostMovementMethod · 0.80
handlePlayerMovementMethod · 0.80
bindMethod · 0.80
ingameHudFunction · 0.80
mainFunction · 0.80
handleRumbleMethod · 0.80
doRumbleMethod · 0.80
handleTooltipsMethod · 0.80
updateButtonsMethod · 0.80
updateAxisMethod · 0.80

Calls 2

printlogFunction · 0.85
getIDMethod · 0.80

Tested by

no test coverage detected