X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fconfig.c;h=fe40a69769a255ebb20c146f78c67193887fd6df;hp=608b066ed64f89aa3ed42b81a0e9a24a8965de0f;hb=40aa8a64f516da6baf703b44d141b37c291553df;hpb=57ef2c8d4520ca5e3d537e7b2ddccef739490cb7 diff --git a/src/config.c b/src/config.c index 608b066e..fe40a697 100644 --- a/src/config.c +++ b/src/config.c @@ -25,7 +25,7 @@ char *getProgramTitleString() return program.program_title; } -char *getProgramVersionString() +char *getProgramRealVersionString() { static char program_version_string[32]; @@ -36,6 +36,11 @@ char *getProgramVersionString() return program_version_string; } +char *getProgramVersionString() +{ + return program.version_string; +} + char *getProgramInitString() { static char *program_init_string = NULL; @@ -52,6 +57,42 @@ char *getProgramInitString() return program_init_string; } +char *getConfigProgramTitleString() +{ + TreeInfo *graphics_current = + getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS); + + return (leveldir_current->program_title ? + leveldir_current->program_title : + graphics_current->program_title ? + graphics_current->program_title : + setup.internal.program_title); +} + +char *getConfigProgramCopyrightString() +{ + TreeInfo *graphics_current = + getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS); + + return (leveldir_current->program_copyright ? + leveldir_current->program_copyright : + graphics_current->program_copyright ? + graphics_current->program_copyright : + setup.internal.program_copyright); +} + +char *getConfigProgramCompanyString() +{ + TreeInfo *graphics_current = + getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS); + + return (leveldir_current->program_company ? + leveldir_current->program_company : + graphics_current->program_company ? + graphics_current->program_company : + setup.internal.program_company); +} + char *getWindowTitleString() { static char *window_title_string = NULL; @@ -64,14 +105,23 @@ char *getWindowTitleString() window_title_string = checked_malloc(strlen(getProgramInitString()) + 20 + strlen(getSourceDateString()) + 2 + 1); - sprintf(window_title_string, "%s (%d %%) [%s]", - getProgramInitString(), video.window_scaling_percent, - getSourceDateString()); + if (setup.internal.show_scaling_in_title) + sprintf(window_title_string, "%s (%d %%) [%s]", + getProgramInitString(), video.window_scaling_percent, + getSourceDateString()); + else + sprintf(window_title_string, "%s [%s]", + getProgramInitString(), + getSourceDateString()); #else window_title_string = checked_malloc(strlen(getProgramInitString()) + 20); - sprintf(window_title_string, "%s (%d %%)", - getProgramInitString(), video.window_scaling_percent); + if (setup.internal.show_scaling_in_title) + sprintf(window_title_string, "%s (%d %%)", + getProgramInitString(), video.window_scaling_percent); + else + sprintf(window_title_string, "%s", + getProgramInitString()); #endif #else