Add setting to show unlisted console commands

This commit is contained in:
Jonathan G Rennison
2020-08-13 18:57:42 +01:00
parent 61a0f98488
commit 8bf41a6f1d
3 changed files with 8 additions and 1 deletions

View File

@@ -1618,7 +1618,7 @@ DEF_CONSOLE_CMD(ConListCommands)
for (const IConsoleCmd *cmd = _iconsole_cmds; cmd != nullptr; cmd = cmd->next) {
if (argv[1] == nullptr || strstr(cmd->name, argv[1]) != nullptr) {
if (cmd->unlisted == false && (cmd->hook == nullptr || cmd->hook(false) != CHR_HIDE)) IConsolePrintF(CC_DEFAULT, "%s", cmd->name);
if ((_settings_client.gui.console_show_unlisted || !cmd->unlisted) && (cmd->hook == nullptr || cmd->hook(false) != CHR_HIDE)) IConsolePrintF(CC_DEFAULT, "%s", cmd->name);
}
}