mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Kernel] Fixed xex2_version
This commit is contained in:
parent
31d715d100
commit
bde7d5579a
|
|
@ -1333,19 +1333,9 @@ std::string Emulator::FindLaunchModule() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string format_version(xex2_version version) {
|
static std::string format_version(xex2_version version) {
|
||||||
// fmt::format doesn't like bit fields
|
// fmt::format doesn't like bit fields we use + to bypass it
|
||||||
uint32_t major, minor, build, qfe;
|
return fmt::format("{}.{}.{}.{}", +version.major, +version.minor,
|
||||||
major = version.major;
|
+version.build, +version.qfe);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
|
X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
|
||||||
|
|
|
||||||
|
|
@ -375,10 +375,10 @@ struct xex2_opt_file_format_info {
|
||||||
union xex2_version {
|
union xex2_version {
|
||||||
uint32_t value;
|
uint32_t value;
|
||||||
struct {
|
struct {
|
||||||
uint32_t major : 4;
|
|
||||||
uint32_t minor : 4;
|
|
||||||
uint32_t build : 16;
|
|
||||||
uint32_t qfe : 8;
|
uint32_t qfe : 8;
|
||||||
|
uint32_t build : 16;
|
||||||
|
uint32_t minor : 4;
|
||||||
|
uint32_t major : 4;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue