diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 3935de7047..8102c84944 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -917,13 +917,15 @@ void __IoCopyDate(ScePspDateTime& date_out, const tm& date_in) static void __IoGetStat(SceIoStat *stat, PSPFileInfo &info) { memset(stat, 0xfe, sizeof(SceIoStat)); - stat->st_size = (s64) info.size; int type, attr; - if (info.type & FILETYPE_DIRECTORY) - type = SCE_STM_FDIR, attr = TYPE_DIR; - else - type = SCE_STM_FREG, attr = TYPE_FILE; + if (info.type & FILETYPE_DIRECTORY) { + type = SCE_STM_FDIR; + attr = TYPE_DIR; + } else { + type = SCE_STM_FREG; + attr = TYPE_FILE; + } stat->st_mode = type | info.access; stat->st_attr = attr; @@ -2504,6 +2506,8 @@ static u32 sceIoDread(int id, u32 dirent_addr) { bool isFAT = pspFileSystem.FlagsFromFilename(dir->name) & FileSystemFlags::SIMULATE_FAT32; // Only write d_private for memory stick if (isFAT) { + // All files look like they're executable on FAT. This is required for Beats, see issue #14812 + entry->d_stat.st_mode |= 0111; // write d_private for supporting Custom BGM // ref JPCSP https://code.google.com/p/jpcsp/source/detail?r=3468 if (Memory::IsValidAddress(entry->d_private)){