Input-rec: Set git tagged emu version instead of static version.

The static version was set as 1.7.0, not knowing which nightly version the recordings were made on.
This commit is contained in:
lightningterror authored and Connor McLaughlin committed 2023-12-11 15:01:13 +10:00
1 parent 2bfefaf296
commit 5718c3d14d
2 files changed
+9 -3

No files matched your search

+8 -2
View File
@@ -22,6 +22,7 @@
#include "common/FileSystem.h"
#include "DebugTools/Debug.h"
#include "MemoryTypes.h"
#include "svnrev.h"
#include "SysForwardDefs.h"
#include <fmt/format.h>
@@ -36,8 +37,13 @@ void InputRecordingFile::InputRecordingFileHeader::init() noexcept
void InputRecordingFile::setEmulatorVersion()
{
static const std::string emuVersion = fmt::format("PCSX2-{}.{}.{}", PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
strncpy(m_header.m_emulatorVersion, emuVersion.c_str(), sizeof(m_header.m_emulatorVersion) - 1);
std::string emuVersion;
if (!PCSX2_isReleaseVersion && GIT_TAGGED_COMMIT)
emuVersion = fmt::format("PCSX2-Nightly-{}", GIT_TAG);
else
emuVersion = fmt::format("PCSX2-{}.{}.{}", PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
StringUtil::Strlcpy(m_header.m_emulatorVersion, emuVersion.c_str(), sizeof(m_header.m_emulatorVersion));
}
void InputRecordingFile::setAuthor(const std::string& _author)
+1 -1
View File
@@ -33,7 +33,7 @@ class InputRecordingFile
public:
void init() noexcept;
} m_header;
} m_header = {};
public: