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

Function enqueueText

src/OpenLoco/src/Input/Keyboard.cpp:220–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 }
219
220 void enqueueText(const char* text)
221 {
222 using namespace Localisation;
223
224 if (text == nullptr || text[0] == '\0')
225 {
226 return;
227 }
228
229 uint32_t index = _keyQueueLastWrite;
230 auto unsignedText = reinterpret_cast<const uint8_t*>(text);
231 _keyQueue[index].charCode = convertUnicodeToLoco(readCodePoint(&unsignedText));
232 }
233
234 // 0x00407028
235 static std::optional<Key> getNextKey()

Callers 2

processMessagesFunction · 0.85
handleKeyInputFunction · 0.85

Calls 2

convertUnicodeToLocoFunction · 0.85
readCodePointFunction · 0.85

Tested by

no test coverage detected