mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
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:
1 parent
280ae09856
commit
4504092d3d
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user