Merge pull request #357 from josefnpat/console-version-command

Adding version command to console
This commit is contained in:
Vadim Grigoruk 2017-10-31 10:19:32 +03:00 committed by GitHub
commit 7a909abdc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -858,6 +858,13 @@ static void onConsoleKeymapCommand(Console* console, const char* param)
commandDone(console);
}
static void onConsoleVersionCommand(Console* console, const char* param)
{
printBack(console, "\n");
consolePrint(console, TIC_VERSION_LABEL, CONSOLE_BACK_TEXT_COLOR);
commandDone(console);
}
static void onConsoleConfigCommand(Console* console, const char* param)
{
if(param == NULL)
@ -1832,6 +1839,7 @@ static const struct
{"demo", NULL, "install demo carts", onConsoleInstallDemosCommand},
{"config", NULL, "edit TIC config", onConsoleConfigCommand},
{"keymap", NULL, "configure keyboard mapping", onConsoleKeymapCommand},
{"version", NULL, "show the current version", onConsoleVersionCommand},
{"surf", NULL, "open carts browser", onConsoleSurfCommand},
};