Merge branch 'xenia-canary:canary_experimental' into canary_experimental

This commit is contained in:
Alexander Meshchaninov 2025-04-16 11:04:36 +03:00 committed by GitHub
commit c12fc5e592
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 16 deletions

View File

@ -1333,19 +1333,9 @@ std::string Emulator::FindLaunchModule() {
}
static std::string format_version(xex2_version version) {
// fmt::format doesn't like bit fields
uint32_t major, minor, build, qfe;
major = version.major;
minor = version.minor;
build = version.build;
qfe = version.qfe;
if (qfe) {
return fmt::format("{}.{}.{}.{}", major, minor, build, qfe);
}
if (build) {
return fmt::format("{}.{}.{}", major, minor, build);
}
return fmt::format("{}.{}", major, minor);
// fmt::format doesn't like bit fields we use + to bypass it
return fmt::format("{}.{}.{}.{}", +version.major, +version.minor,
+version.build, +version.qfe);
}
X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,

View File

@ -375,10 +375,10 @@ struct xex2_opt_file_format_info {
union xex2_version {
uint32_t value;
struct {
uint32_t major : 4;
uint32_t minor : 4;
uint32_t build : 16;
uint32_t qfe : 8;
uint32_t build : 16;
uint32_t minor : 4;
uint32_t major : 4;
};
};