sceUsbMic: Don't crash when there's no Windows capture device object

Only the app creates winMic, so a blocking mic read crashed headless.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-29 11:19:18 -06:00
1 parent 280ae09856
commit 4504092d3d
1 file changed
+2 -1
+2 -1
View File
@@ -346,7 +346,8 @@ int Microphone::stopMic() {
bool Microphone::isHaveDevice() {
#ifdef HAVE_WIN32_MICROPHONE
return winMic->getDeviceCounts() >= 1;
// Only the app creates winMic, headless doesn't.
return winMic && winMic->getDeviceCounts() >= 1;
#elif PPSSPP_PLATFORM(ANDROID)
return System_AudioRecordingIsAvailable();
#endif