added internal variable for program basename
authorHolger Schemel <info@artsoft.org>
Wed, 8 Feb 2023 12:04:58 +0000 (13:04 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 8 Feb 2023 12:04:58 +0000 (13:04 +0100)
src/libgame/system.c
src/libgame/system.h
src/main.c

index 9888ef1307eebb440b0006bb376b810b635533e1..7d1f5893d8d281c5b8b35ae84aa219d5ac7cdc93 100644 (file)
@@ -70,7 +70,7 @@ int                   FrameCounter = 0;
 // ============================================================================
 
 void InitProgramInfo(char *argv0, char *config_filename, char *userdata_subdir,
-                    char *program_title,
+                    char *program_basename, char *program_title,
                     char *icon_filename, char *cookie_prefix,
                     char *program_version_string, int program_version)
 {
@@ -82,6 +82,7 @@ void InitProgramInfo(char *argv0, char *config_filename, char *userdata_subdir,
   program.userdata_subdir = userdata_subdir;
   program.userdata_path = getMainUserGameDataDir();
 
+  program.program_basename = program_basename;
   program.program_title = program_title;
   program.window_title = "(undefined)";
 
index 23e37276319a986454f5062c206d6ce67572a898..b9a7c4647619d083d956f6238cfe10ea16d6730f 100644 (file)
@@ -1027,6 +1027,7 @@ struct ProgramInfo
   char *userdata_subdir;       // personal user game data directory
   char *userdata_path;         // resulting full path to game data directory
 
+  char *program_basename;
   char *program_title;
   char *window_title;
 
@@ -1944,7 +1945,7 @@ extern int                        FrameCounter;
 
 // function definitions
 
-void InitProgramInfo(char *, char *, char *, char *, char *, char *,
+void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *,
                     char *, int);
 void InitNetworkInfo(boolean, boolean, boolean, char *, int);
 void InitRuntimeInfo(void);
index 793b7af044858fdf23c509249e49b60c7d8dd2b6..9e5828d39aa0daac8590ab16c15e029623e9236c 100644 (file)
@@ -7798,6 +7798,7 @@ static void InitProgramConfig(char *command_filename)
   InitProgramInfo(command_filename,
                  config_filename,
                  userdata_subdir,
+                 program_basename,
                  program_title,
                  program_icon_file,
                  COOKIE_PREFIX,