mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
Merge pull request #16235 from unknownbrackets/minor
Small reported related fixes/cleanup
This commit is contained in:
3 files changed
+14
-4
No files matched your search
@@ -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());
|
||||
|
||||
@@ -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 : "?");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user