Parse version number from a string and provide it to the runtime

This commit is contained in:
Mr-Wiseguy
2024-09-02 20:00:47 -04:00
parent 2c23d5f29b
commit be70a2a8f1
4 changed files with 15 additions and 4 deletions
+4 -2
View File
@@ -6,7 +6,7 @@
#include "nfd.h"
#include <filesystem>
std::string version_number = "v1.1.1";
static std::string version_string;
Rml::DataModelHandle model_handle;
bool mm_rom_valid = false;
@@ -103,7 +103,9 @@ public:
Rml::DataModelConstructor constructor = context->CreateDataModel("launcher_model");
constructor.Bind("mm_rom_valid", &mm_rom_valid);
constructor.Bind("version_number", &version_number);
version_string = recomp::get_project_version().to_string();
constructor.Bind("version_number", &version_string);
model_handle = constructor.GetModelHandle();
}