0x00407028
| 233 | |
| 234 | // 0x00407028 |
| 235 | static std::optional<Key> getNextKey() |
| 236 | { |
| 237 | uint32_t readIndex = _keyQueueReadIndex; |
| 238 | if (readIndex == _keyQueueWriteIndex) |
| 239 | { |
| 240 | return std::nullopt; |
| 241 | } |
| 242 | |
| 243 | const auto nextKey = _keyQueue[readIndex]; |
| 244 | readIndex++; |
| 245 | |
| 246 | // Wrap around at _keyQueue size |
| 247 | readIndex %= std::size(_keyQueue); |
| 248 | _keyQueueReadIndex = readIndex; |
| 249 | |
| 250 | return nextKey; |
| 251 | } |
| 252 | |
| 253 | static bool tryShortcut(Shortcut sc, uint32_t keyCode, KeyModifier modifiers) |
| 254 | { |