MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / enqueueKey

Function enqueueKey

src/OpenLoco/src/Input/Keyboard.cpp:189–200  ·  view source on GitHub ↗

0x00406FBA

Source from the content-addressed store, hash-verified

187
188 // 0x00406FBA
189 void enqueueKey(uint32_t keycode)
190 {
191 uint32_t writeIndex = _keyQueueWriteIndex;
192 auto nextWriteIndex = static_cast<uint32_t>((writeIndex + 1) % std::size(_keyQueue));
193 if (nextWriteIndex == _keyQueueReadIndex)
194 {
195 return;
196 }
197 _keyQueueLastWrite = writeIndex;
198 _keyQueue[writeIndex] = { keycode, 0 };
199 _keyQueueWriteIndex = nextWriteIndex;
200 }
201
202 // 0x00406FBA
203 void handleKeyInput(uint32_t keycode)

Callers 1

handleKeyInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected