Skip to content

Commit

Permalink
Merge pull request #9790 from unknownbrackets/homebrew
Browse files Browse the repository at this point in the history
Set a working directory for homebrew outside ms0:/PSP/GAME/
  • Loading branch information
hrydgard committed Jun 8, 2017
2 parents 2cd8bb5 + 1339bf1 commit 15aff3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Core/HLE/sceVaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ static u32 sceVaudioChRelease() {

static u32 sceVaudioOutputBlocking(int vol, u32 buffer) {
DEBUG_LOG(SCEAUDIO, "sceVaudioOutputBlocking(%i, %08x)", vol, buffer);
chans[PSP_AUDIO_CHANNEL_OUTPUT2].leftVolume = vol;
chans[PSP_AUDIO_CHANNEL_OUTPUT2].rightVolume = vol;
chans[PSP_AUDIO_CHANNEL_VAUDIO].leftVolume = vol;
chans[PSP_AUDIO_CHANNEL_VAUDIO].rightVolume = vol;
// TODO: This may be wrong, not sure if's in a different format?
chans[PSP_AUDIO_CHANNEL_OUTPUT2].sampleAddress = buffer;
chans[PSP_AUDIO_CHANNEL_VAUDIO].sampleAddress = buffer;
return __AudioEnqueue(chans[PSP_AUDIO_CHANNEL_VAUDIO], PSP_AUDIO_CHANNEL_VAUDIO, true);
}

Expand Down
9 changes: 4 additions & 5 deletions Core/PSPLoaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,9 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
if (pos != std::string::npos) {
ms_path = "ms0:" + path.substr(pos);
} else {
// Hmm..
ms_path = "umd0:";
// This is wrong, but it's better than not having a working directory at all.
// Note that umd0:/ is actually the writable containing directory, in this case.
ms_path = "umd0:/";
}

#ifdef _WIN32
Expand All @@ -314,9 +315,7 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
path = rootNorm + "/";
pspFileSystem.SetStartingDirectory(filepath);
} else {
if (pos != std::string::npos) {
pspFileSystem.SetStartingDirectory(ms_path);
}
pspFileSystem.SetStartingDirectory(ms_path);
}

DirectoryFileSystem *fs = new DirectoryFileSystem(&pspFileSystem, path);
Expand Down

0 comments on commit 15aff3d

Please sign in to comment.