Skip to content
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

HLE/FS: Implemented FSFile::OpenSubFile. #3235

Merged
merged 1 commit into from Dec 12, 2017
Merged

HLE/FS: Implemented FSFile::OpenSubFile. #3235

merged 1 commit into from Dec 12, 2017

Conversation

Subv
Copy link
Member

@Subv Subv commented Dec 7, 2017

The File class now holds a list of connected sessions along with data unique to each session.

A subfile is a window into an existing file. They have a few limitations compared to normal files:

  • They can't be written to.
  • They can't be flushed.
  • Their size can not be changed.
  • New subfiles can't be created from another subfile.

This function is used by the DLP module to open the DLPChild CIA from the game's RomFS.


This change is Reviewable

bool subfile; ///< Whether this file was opened via OpenSubFile or not.
};

std::vector<SessionSlot> session_slots;
Copy link
Member

@lioncash lioncash Dec 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<vector> needs to be included.

std::unique_ptr<FileSys::FileBackend> backend; ///< File backend interface

/// Creates a new session to this File and returns the ClientSession part of the connection.
Kernel::SharedPtr<Kernel::ClientSession> Connect();
Copy link
Member

@lioncash lioncash Dec 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"core/hle/kernel/kernel.h" needs to be included.

}

File::SessionSlot& File::GetSessionSlot(Kernel::SharedPtr<Kernel::ServerSession> session) {
auto itr = std::find_if(session_slots.begin(), session_slots.end(),
Copy link
Member

@lioncash lioncash Dec 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<algorithm> needs to be included.

@Subv
Copy link
Member Author

Subv commented Dec 7, 2017

Addressed

bunnei
bunnei approved these changes Dec 7, 2017
@ghost
Copy link

ghost commented Dec 11, 2017

FBI causes citra to crash trying to install cias.

@wwylele
Copy link
Member

wwylele commented Dec 12, 2017

@valentinvanelslande how is that related to this PR

@ghost
Copy link

ghost commented Dec 12, 2017

The File class now holds a list of connected sessions along with data unique to each session.

A subfile is a window into an existing file. They have a few limitations compared to normal files:

* They can't be written to.
* They can't be flushed.
* Their size can not be changed.
* New subfiles can't be created from another subfile.
@Subv
Copy link
Member Author

Subv commented Dec 12, 2017

Should be fixed now

@Subv Subv merged commit 6afd091 into citra-emu:master Dec 12, 2017
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants