summaryrefslogtreecommitdiff
path: root/src/m_argv.c
diff options
context:
space:
mode:
authorSimon Howard2009-07-09 20:08:20 +0000
committerSimon Howard2009-07-09 20:08:20 +0000
commit62df1ab1dd5bd04c5e6228cea09442c5177a955e (patch)
tree846055b3ece1931e075c2c1b8c52a59de2bf6944 /src/m_argv.c
parentd03dd75b5c4098f1fa59a4a0074b4770e73d835b (diff)
downloadchocolate-doom-62df1ab1dd5bd04c5e6228cea09442c5177a955e.tar.gz
chocolate-doom-62df1ab1dd5bd04c5e6228cea09442c5177a955e.tar.bz2
chocolate-doom-62df1ab1dd5bd04c5e6228cea09442c5177a955e.zip
Select the game to configure automatically if the game name is found
inside the name of the executable. Rename the executable for the Windows CE install packages. Subversion-branch: /branches/raven-branch Subversion-revision: 1612
Diffstat (limited to 'src/m_argv.c')
-rw-r--r--src/m_argv.c18
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;
+ }
+}
+