From 1d25e249e84f62fabf5d84e646a51857168de5b9 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sun, 18 Nov 2018 17:17:12 +0100 Subject: [PATCH] GCMemcard: Use BigEndianValue for DEntry.m_modification_time. --- Source/Core/Core/HW/GCMemcard/GCMemcard.cpp | 2 +- Source/Core/Core/HW/GCMemcard/GCMemcard.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp index a62184b81d..9dc7012927 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp @@ -436,7 +436,7 @@ u32 GCMemcard::DEntry_ModTime(u8 index) const if (!m_valid || index >= DIRLEN) return 0xFFFFFFFF; - return BE32(CurrentDir->m_dir_entries[index].m_modification_time); + return CurrentDir->m_dir_entries[index].m_modification_time; } u32 GCMemcard::DEntry_ImageOffset(u8 index) const diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.h b/Source/Core/Core/HW/GCMemcard/GCMemcard.h index 848f4e8126..03d31ee322 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.h @@ -187,10 +187,11 @@ struct DEntry // 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner // u8 m_filename[DENTRY_STRLEN]; // 0x08 0x20 Filename - u8 m_modification_time[4]; // 0x28 0x04 Time of file's last modification in seconds since - // 12am, January 1st, 2000 - u8 m_image_offset[4]; // 0x2c 0x04 image data offset - u8 m_icon_format[2]; // 0x30 0x02 icon gfx format (2bits per icon) + Common::BigEndianValue + m_modification_time; // 0x28 0x04 Time of file's last modification in seconds since + // 12am, January 1st, 2000 + u8 m_image_offset[4]; // 0x2c 0x04 image data offset + u8 m_icon_format[2]; // 0x30 0x02 icon gfx format (2bits per icon) // Bits Description // 00 No icon // 01 CI8 with a shared color palette after the last frame