1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-05 02:39:41 +01:00

Add -version command-line argument

Probably should have done this earlier in 2.3, but better late than
never.

This makes it easier for third-party programs like Ved to detect what
version of the game this is.

Slightly quick-n-dirty for now, I'll de-duplicate the version number
later, and add commit hash and date if applicable.
This commit is contained in:
Misa 2022-05-23 14:34:36 -07:00
parent f6ede079fb
commit a46c49c89a

View file

@ -383,7 +383,15 @@ int main(int argc, char *argv[])
VVV_exit(1); \ VVV_exit(1); \
} }
if (ARG("-renderer")) if (ARG("-version"))
{
/* Just print the version and exit. No vlogging. */
/* TODO: Version should be de-duplicated and only set in one place... TwT */
/* TODO: Also print commit date and hash, if applicable. */
puts("VVVVVV v2.4");
VVV_exit(0);
}
else if (ARG("-renderer"))
{ {
ARG_INNER({ ARG_INNER({
i++; i++;