More byteswaps

This commit is contained in:
dbalatoni13 2025-04-07 01:07:57 +02:00
parent 10efa92153
commit b480f7bfce
5 changed files with 147 additions and 92 deletions

View file

@ -279,13 +279,20 @@ BOOL HuDataGetAsyncStat(s32 status)
static void GetFileInfo(DataReadStat *read_stat, s32 file_num)
{
uintptr_t *temp_ptr;
temp_ptr = (uintptr_t *)PTR_OFFSET(read_stat->dir, (file_num * 4))+1;
u32 *temp_ptr;
temp_ptr = (u32 *)PTR_OFFSET(read_stat->dir, (file_num * 4))+1;
#ifdef TARGET_PC
byteswap_u32(temp_ptr);
#endif
read_stat->file = PTR_OFFSET(read_stat->dir, *temp_ptr);
temp_ptr = read_stat->file;
read_stat->raw_len = *temp_ptr++;
read_stat->comp_type = *temp_ptr++;
read_stat->file = temp_ptr;
#ifdef TARGET_PC
byteswap_u32(&read_stat->raw_len);
byteswap_u32(&read_stat->comp_type);
#endif
}
void *HuDataRead(s32 data_num)