Refactor FourCC magic uses

- Use new fourcc_t type
- Improves compiler compatibility by removing multi chars
This commit is contained in:
Joel Linn
2021-05-06 18:46:43 +02:00
committed by Rick Gibbed
parent 4daa3f5a52
commit a86d7173e1
25 changed files with 65 additions and 42 deletions

View File

@@ -420,7 +420,7 @@ bool Emulator::SaveToFile(const std::filesystem::path& path) {
// Save the emulator state to a file
ByteStream stream(map->data(), map->size());
stream.Write('XSAV');
stream.Write(kEmulatorSaveSignature);
stream.Write(title_id_.has_value());
if (title_id_.has_value()) {
stream.Write(title_id_.value());
@@ -454,7 +454,7 @@ bool Emulator::RestoreFromFile(const std::filesystem::path& path) {
auto lock = global_critical_region::AcquireDirect();
ByteStream stream(map->data(), map->size());
if (stream.Read<uint32_t>() != 'XSAV') {
if (stream.Read<uint32_t>() != kEmulatorSaveSignature) {
return false;
}