Permalink
Browse files

Merge pull request #9790 from unknownbrackets/homebrew

Set a working directory for homebrew outside ms0:/PSP/GAME/
  • Loading branch information...
hrydgard committed Jun 8, 2017
2 parents 2cd8bb5 + 1339bf1 commit 15aff3d368a7d2c1166a15f0aa21e29a3fb0728d
Showing with 7 additions and 8 deletions.
  1. +3 −3 Core/HLE/sceVaudio.cpp
  2. +4 −5 Core/PSPLoaders.cpp
View
@@ -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);
}
View
@@ -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
@@ -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);

0 comments on commit 15aff3d

Please sign in to comment.