mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
2bfefaf296
commit
5718c3d14d
|
@ -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)
|
||||
|
|
|
@ -33,7 +33,7 @@ class InputRecordingFile
|
|||
|
||||
public:
|
||||
void init() noexcept;
|
||||
} m_header;
|
||||
} m_header = {};
|
||||
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue