From: Holger Schemel Date: Wed, 8 Feb 2023 12:04:58 +0000 (+0100) Subject: added internal variable for program basename X-Git-Tag: 4.3.5.0~11 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=fea9a68bc45aeb19f3364e34290222ce24b61b73;p=rocksndiamonds.git added internal variable for program basename --- diff --git a/src/libgame/system.c b/src/libgame/system.c index 9888ef13..7d1f5893 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -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)"; diff --git a/src/libgame/system.h b/src/libgame/system.h index 23e37276..b9a7c464 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -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); diff --git a/src/main.c b/src/main.c index 793b7af0..9e5828d3 100644 --- a/src/main.c +++ b/src/main.c @@ -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,