diff options
Diffstat (limited to 'src/m_argv.c')
-rw-r--r-- | src/m_argv.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/m_argv.c b/src/m_argv.c index 1d07a196..e2b551f1 100644 --- a/src/m_argv.c +++ b/src/m_argv.c @@ -243,3 +243,21 @@ void M_FindResponseFile(void) } } +// Return the name of the executable used to start the program: + +char *M_GetExecutableName(void) +{ + char *sep; + + sep = strrchr(myargv[0], DIR_SEPARATOR); + + if (sep == NULL) + { + return myargv[0]; + } + else + { + return sep + 1; + } +} + |