| 162 | } |
| 163 | |
| 164 | static int PossibleKeys(const char *pStr, IInput *pInput, IConsole::FPossibleCallback pfnCallback = IConsole::EmptyPossibleCommandCallback, void *pUser = nullptr) |
| 165 | { |
| 166 | int Index = 0; |
| 167 | for(int Key = KEY_A; Key < KEY_JOY_AXIS_11_RIGHT; Key++) |
| 168 | { |
| 169 | // Ignore unnamed keys starting with '&' |
| 170 | const char *pKeyName = pInput->KeyName(Key); |
| 171 | if(pKeyName[0] != '&' && str_find_nocase(pKeyName, pStr)) |
| 172 | { |
| 173 | pfnCallback(Index, pKeyName, pUser); |
| 174 | Index++; |
| 175 | } |
| 176 | } |
| 177 | return Index; |
| 178 | } |
| 179 | |
| 180 | static void CollectPossibleCommandsCallback(int Index, const char *pStr, void *pUser) |
| 181 | { |
no test coverage detected