New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for alignment of zero-length files within directory based virtual disk #2271
Conversation
@@ -459,7 +459,7 @@ void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u | |||
m_virtualDisk.insert(make_pair(dataOffset, entry.physicalName)); | |||
|
|||
// 4 byte aligned | |||
dataOffset = ROUND_UP(dataOffset + entry.size, 0x8000ull); | |||
dataOffset = ROUND_UP(dataOffset + std::max(entry.size, (u64)1), 0x8000ull); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
The two commits should be squashed into one commit. Other than that, this looks good to me. |
git noob. took me longer to figure out the rebasing than it should have. |
@dolphin-emu-bot rebuild |
Buildbot failures need to be fixed before this can be merged. |
@lioncash Is it possible to fix the buildbot failures without changing |
@JosJuice Making the type specifier explicit. e.g. std::max(entry.size, 1) should work |
…d from directory on disk Updating constant value representation Explicitly state data type in std:max usage
Ok, updated. Was not receiving notifications for this for some reason. |
LGTM. Thanks for making this PR. |
No problem. Sorry it took me so long to get the PR sorted out. |
Fix for alignment of zero-length files within directory based virtual disk
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
When a game is executed from a directory on disk, any zero-length files will not cause an alignment shift for the file that follows it causing them to overlap in the virtual file table.