summaryrefslogtreecommitdiff
path: root/indra/newview/rlvcommon.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2024-08-31 01:33:27 +0200
committerKitty Barnett <develop@catznip.com>2024-08-31 22:16:46 +0200
commitc820bb2929a37fb222ce0d7368d699e81f5edc00 (patch)
tree30f4f17db0b39738ba23b68c3d20b7f5afa0fe4f /indra/newview/rlvcommon.cpp
parente92a06d68114c933599da12d75221504ebac77e0 (diff)
Minimal code needed to add RLVa with an on/off toggle
Diffstat (limited to 'indra/newview/rlvcommon.cpp')
-rw-r--r--indra/newview/rlvcommon.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp
new file mode 100644
index 0000000000..f641d56a85
--- /dev/null
+++ b/indra/newview/rlvcommon.cpp
@@ -0,0 +1,40 @@
+#include "llviewerprecompiledheaders.h"
+#include "llversioninfo.h"
+
+#include "rlvdefines.h"
+#include "rlvcommon.h"
+
+using namespace Rlv;
+
+// ============================================================================
+// RlvStrings
+//
+
+std::string RlvStrings::getVersion(bool wants_legacy)
+{
+ return llformat("%s viewer v%d.%d.%d (RLVa %d.%d.%d)",
+ !wants_legacy ? "RestrainedLove" : "RestrainedLife",
+ SpecVersion::Major, SpecVersion::Minor, SpecVersion::Patch,
+ ImplVersion::Major, ImplVersion::Minor, ImplVersion::Patch);
+}
+
+std::string RlvStrings::getVersionAbout()
+{
+ return llformat("RLV v%d.%d.%d / RLVa v%d.%d.%d.%d",
+ SpecVersion::Major, SpecVersion::Minor, SpecVersion::Patch,
+ ImplVersion::Major, ImplVersion::Minor, ImplVersion::Patch, LLVersionInfo::instance().getBuild());
+}
+
+std::string RlvStrings::getVersionNum()
+{
+ return llformat("%d%02d%02d%02d",
+ SpecVersion::Major, SpecVersion::Minor, SpecVersion::Patch, SpecVersion::Build);
+}
+
+std::string RlvStrings::getVersionImplNum()
+{
+ return llformat("%d%02d%02d%02d",
+ ImplVersion::Major, ImplVersion::Minor, ImplVersion::Patch, ImplVersion::ImplId);
+}
+
+// ============================================================================