MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / LogControlDeviceAndModeChange

Function LogControlDeviceAndModeChange

Source/controls/plrctrls.cpp:1577–1589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1575}
1576
1577void LogControlDeviceAndModeChange(ControlTypes newControlDevice, ControlTypes newControlMode)
1578{
1579 if (SDL_LOG_PRIORITY_VERBOSE < SDL_LogGetPriority(SDL_LOG_CATEGORY_APPLICATION))
1580 return;
1581 if (newControlDevice == ControlDevice && newControlMode == ControlMode)
1582 return;
1583 constexpr auto DebugChange = [](ControlTypes before, ControlTypes after) -> std::string {
1584 if (before == after)
1585 return std::string { ControlTypeToString(before) };
1586 return StrCat(ControlTypeToString(before), " -> ", ControlTypeToString(after));
1587 };
1588 LogVerbose("Control: device {}, mode {}", DebugChange(ControlDevice, newControlDevice), DebugChange(ControlMode, newControlMode));
1589}
1590
1591#ifndef USE_SDL1
1592string_view GamepadTypeToString(GamepadLayout gamepadLayout)

Callers 2

DetectInputMethodFunction · 0.85
HandleRightStickMotionFunction · 0.85

Calls 4

SDL_LogGetPriorityFunction · 0.85
ControlTypeToStringFunction · 0.85
StrCatFunction · 0.85
LogVerboseFunction · 0.85

Tested by

no test coverage detected