SDL
SDL copied to clipboard
[SDL2]: Add an ability to prevent initialization of capture devices
Hello!
On a quick hand, I made an incomplete thing that prevents to initialize any capture devices: https://github.com/Wohlstand/SDL/commit/1ad2810d5e5ebecebc311b4a6f94c0b2b05c885d
Primarily it's need on modern macOS to prevent it to request "permission for microphone" which is actually not needed by me at all (and I don't even use any capture devices at all). However, this seems to be a workaround rather than a true solution of "microphone permission problem".
Maybe instead, don't initialize any capture devices before the first request on macOS especially?
We shouldn't be accessing capture devices (beyond enumerating them), but this might be only true in SDL3, or I might be completely wrong. I'll double-check and we can decide if a hint is necessary.
On SDL2 this is actually a problem: in my apps I don't use audio capture at all, but macOS still asks a permission for microphone.
And also I saw a smiliar case with other apps that use SDL2, and the problem is the same.