MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetKeyValue

Method GetKeyValue

engine/Poseidon/Input/InputSubsystem.cpp:632–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630
631float InputSubsystem::GetKeyValue(SDL_Scancode sc) const
632{
633 int idx = static_cast<int>(sc);
634 if (idx < 0 || idx >= SDL_SCANCODE_COUNT)
635 return 0.0f;
636 return GInput.keyboard.keys[idx];
637}
638
639bool InputSubsystem::ConsumeKeyPress(SDL_Scancode sc)
640{
641 int idx = static_cast<int>(sc);

Callers 3

SimulateMethod · 0.80
SimulateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected