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

Function initGameControllers

src/player.cpp:2728–2746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2726}
2727
2728void initGameControllers()
2729{
2730 inputs.setPlayerIDAllowedKeyboard(0);
2731
2732 bool found = false;
2733 for ( auto controller : game_controllers )
2734 {
2735 if ( controller.isActive() )
2736 {
2737 found = true;
2738 break;
2739 }
2740 }
2741
2742 if (!found)
2743 {
2744 printlog("Info: No game controller detected!");
2745 }
2746}
2747
2748SDL_GameControllerButton GameController::getSDLButtonFromImpulse(const unsigned controllerImpulse)
2749{

Callers 1

initGameFunction · 0.85

Calls 3

printlogFunction · 0.85
isActiveMethod · 0.45

Tested by

no test coverage detected