added sending platform to score server
authorHolger Schemel <holger.schemel@virtion.de>
Wed, 22 Sep 2021 12:47:21 +0000 (14:47 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Wed, 22 Sep 2021 12:48:51 +0000 (14:48 +0200)
src/config.c
src/config.h
src/files.c
src/screens.c

index d50ba68470e9a0cbd30b1584c3b125335f3c77d0..8a7a5c5bb0ca1cc40265a3e3a154138fe212550b 100644 (file)
@@ -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;
index 06ae39e6d90e68ba8dd111c43f50bba28b441721..31e86b87b9e58720d891f7abcee99eea6a6ef2d1 100644 (file)
@@ -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);
index 468473e3ab1d4312ba055cb2efbbad2fa4048124..06c1ac510620b3280a547a9ba2d14d457d567267 100644 (file)
@@ -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,
index 54c03fde2eaf02edcd7df9b68fd47447c33f2c38..369124a77f917106b90e39b64d3d69e5902298d7 100644 (file)
@@ -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);