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

Method ConsumeKeyPress

engine/Poseidon/Input/InputSubsystem.cpp:640–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638
639bool InputSubsystem::ConsumeKeyPress(SDL_Scancode sc)
640{
641 int idx = static_cast<int>(sc);
642 if (idx < 0 || idx >= SDL_SCANCODE_COUNT)
643 return false;
644 bool pressed = GInput.keyboard.keysToDo[idx];
645 GInput.keyboard.keysToDo[idx] = false;
646 return pressed;
647}
648
649bool InputSubsystem::ConsumeDevKeyPress(SDL_Scancode sc)
650{
651 // Always consume the edge — even when dev mode is off — so the press

Callers 8

SimulateMethod · 0.45
SimulateMethod · 0.45
BreakIntroFunction · 0.45
CheckIgnoredKeyMethod · 0.45
OnSimulateMethod · 0.45
SimulateMethod · 0.45
OnSimulateMethod · 0.45
RenderFrameFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected