From: Holger Schemel Date: Wed, 22 Sep 2021 12:47:21 +0000 (+0200) Subject: added sending platform to score server X-Git-Tag: 4.3.0.0~47 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f2b5c31430a9feeb0d7bb1aa9e21c2f8a230f548;p=rocksndiamonds.git added sending platform to score server --- diff --git a/src/config.c b/src/config.c index d50ba684..8a7a5c5b 100644 --- a/src/config.c +++ b/src/config.c @@ -47,6 +47,11 @@ char *getProgramVersionString(void) return program.version_string; } +char *getProgramPlatformString(void) +{ + return PLATFORM_STRING; +} + char *getProgramInitString(void) { static char *program_init_string = NULL; diff --git a/src/config.h b/src/config.h index 06ae39e6..31e86b87 100644 --- a/src/config.h +++ b/src/config.h @@ -19,6 +19,7 @@ char *getSourceHashString(void); char *getProgramTitleString(void); char *getProgramRealVersionString(void); char *getProgramVersionString(void); +char *getProgramPlatformString(void); char *getProgramInitString(void); char *getConfigProgramTitleString(void); char *getConfigProgramCopyrightString(void); diff --git a/src/files.c b/src/files.c index 468473e3..06c1ac51 100644 --- a/src/files.c +++ b/src/files.c @@ -9077,11 +9077,13 @@ static void DownloadServerScoreToCacheExt(struct HttpRequest *request, "{\n" "%s" " \"game_version\": \"%s\",\n" + " \"game_platform\": \"%s\",\n" " \"levelset_identifier\": \"%s\",\n" " \"level_nr\": \"%d\"\n" "}\n", getPasswordJSON(setup.api_server_password), getProgramRealVersionString(), + getProgramPlatformString(), levelset.identifier, level_nr); ConvertHttpRequestBodyToServerEncoding(request); @@ -9361,6 +9363,7 @@ static void UploadScoreToServerExt(struct HttpRequest *request, "{\n" "%s" " \"game_version\": \"%s\",\n" + " \"game_platform\": \"%s\",\n" " \"batch_time\": \"%d\",\n" " \"levelset_identifier\": \"%s\",\n" " \"levelset_name\": \"%s\",\n" @@ -9380,6 +9383,7 @@ static void UploadScoreToServerExt(struct HttpRequest *request, "}\n", getPasswordJSON(setup.api_server_password), getProgramRealVersionString(), + getProgramPlatformString(), (int)global.autoplay_time, levelset_identifier, levelset_name, diff --git a/src/screens.c b/src/screens.c index 54c03fde..369124a7 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4059,11 +4059,13 @@ static void RenamePlayerOnServerExt(struct HttpRequest *request, "{\n" "%s" " \"game_version\": \"%s\",\n" + " \"game_platform\": \"%s\",\n" " \"name\": \"%s\",\n" " \"uuid\": \"%s\"\n" "}\n", getPasswordJSON(setup.api_server_password), getProgramRealVersionString(), + getProgramPlatformString(), player_name, player_uuid);