Skip to content

Commit

Permalink
Merge pull request #16235 from unknownbrackets/minor
Browse files Browse the repository at this point in the history
Small reported related fixes/cleanup
  • Loading branch information
hrydgard committed Oct 16, 2022
2 parents cd0cef7 + 770fdbe commit 870c5d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Core/FileSystems/DirectoryFileSystem.cpp
Expand Up @@ -115,6 +115,11 @@ Path DirectoryFileSystem::GetLocalPath(std::string internalPath) const {
bool DirectoryFileHandle::Open(const Path &basePath, std::string &fileName, FileAccess access, u32 &error) {
error = 0;

if (access == FILEACCESS_NONE) {
error = SCE_KERNEL_ERROR_ERRNO_INVALID_ARGUMENT;
return false;
}

#if HOST_IS_CASE_SENSITIVE
if (access & (FILEACCESS_APPEND | FILEACCESS_CREATE | FILEACCESS_WRITE)) {
DEBUG_LOG(FILESYS, "Checking case for path %s", fileName.c_str());
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/sceKernelThread.cpp
Expand Up @@ -1644,7 +1644,7 @@ void __KernelStopThread(SceUID threadID, int exitStatus, const char *reason)
t->nt.waitType = WAITTYPE_NONE;
t->nt.waitID = 0;
} else {
ERROR_LOG_REPORT(SCEKERNEL, "__KernelStopThread: thread %d does not exist", threadID);
ERROR_LOG_REPORT(SCEKERNEL, "__KernelStopThread: thread %d does not exist (%s)", threadID, reason ? reason : "?");
}
}

Expand Down
11 changes: 8 additions & 3 deletions Windows/WASAPIStream.cpp
Expand Up @@ -366,13 +366,16 @@ bool WASAPIAudioThread::DetectFormat() {
CoTaskMemFree(deviceFormat_);
deviceFormat_ = closest;
} else {
ERROR_LOG_REPORT_ONCE(badfallbackclosest, SCEAUDIO, "WASAPI fallback and closest unsupported");
wchar_t guid[256]{};
StringFromGUID2(closest->SubFormat, guid, 256);
ERROR_LOG_REPORT_ONCE(badfallbackclosest, SCEAUDIO, "WASAPI fallback and closest unsupported (fmt=%04x/%s)", closest->Format.wFormatTag, guid);
CoTaskMemFree(closest);
return false;
}
} else {
CoTaskMemFree(closest);
ERROR_LOG_REPORT_ONCE(badfallback, SCEAUDIO, "WASAPI fallback format was unsupported");
if (hr != AUDCLNT_E_DEVICE_INVALIDATED && hr != AUDCLNT_E_SERVICE_NOT_RUNNING)
ERROR_LOG_REPORT_ONCE(badfallback, SCEAUDIO, "WASAPI fallback format was unsupported (%08x)", hr);
return false;
}
}
Expand All @@ -390,7 +393,9 @@ bool WASAPIAudioThread::ValidateFormat(const WAVEFORMATEXTENSIBLE *fmt) {
if (fmt->Format.nChannels >= 1)
format_ = Format::IEEE_FLOAT;
} else {
ERROR_LOG_REPORT_ONCE(unexpectedformat, SCEAUDIO, "Got unexpected WASAPI 0xFFFE stream format, expected float!");
wchar_t guid[256]{};
StringFromGUID2(fmt->SubFormat, guid, 256);
ERROR_LOG_REPORT_ONCE(unexpectedformat, SCEAUDIO, "Got unexpected WASAPI 0xFFFE stream format (%S), expected float!", guid);
if (fmt->Format.wBitsPerSample == 16 && fmt->Format.nChannels == 2) {
format_ = Format::PCM16;
}
Expand Down

0 comments on commit 870c5d3

Please sign in to comment.