summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Version.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-06-04 13:41:01 +0200
committerGitHub <noreply@github.com>2024-06-04 13:41:01 +0200
commitc04460d88b4f18d4b42dc81359aae1399776d2b0 (patch)
treed8d87c7d180507216ddd43f3cd6b73f329a39e83 /Source/Core/Common/Version.cpp
parent46a89936ae0724bf087a228133f4bd7bd682da3a (diff)
parent9499e142094bcdaa374d51e758ac889b859a2297 (diff)
Merge pull request #12580 from LillyJadeKatrin/retroachievements-bugfix
Add user agent to headers for all RetroAchievements server calls
Diffstat (limited to 'Source/Core/Common/Version.cpp')
-rw-r--r--Source/Core/Common/Version.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/Core/Common/Version.cpp b/Source/Core/Common/Version.cpp
index 25c678f061..618d000b9f 100644
--- a/Source/Core/Common/Version.cpp
+++ b/Source/Core/Common/Version.cpp
@@ -9,6 +9,8 @@
namespace Common
{
+#define EMULATOR_NAME "Dolphin"
+
#ifdef _DEBUG
#define BUILD_TYPE_STR "Debug "
#elif defined DEBUGFAST
@@ -19,10 +21,10 @@ namespace Common
const std::string& GetScmRevStr()
{
- static const std::string scm_rev_str = "Dolphin "
+ static const std::string scm_rev_str = EMULATOR_NAME " "
// Note this macro can be empty if the master branch does not exist.
#if 1 - SCM_COMMITS_AHEAD_MASTER - 1 != 0
- "[" SCM_BRANCH_STR "] "
+ "[" SCM_BRANCH_STR "] "
#endif
#ifdef __INTEL_COMPILER
@@ -51,6 +53,12 @@ const std::string& GetScmBranchStr()
return scm_branch_str;
}
+const std::string& GetUserAgentStr()
+{
+ static const std::string user_agent_str = EMULATOR_NAME "/" SCM_DESC_STR;
+ return user_agent_str;
+}
+
const std::string& GetScmDistributorStr()
{
static const std::string scm_distributor_str = SCM_DISTRIBUTOR_STR;