SDL icon indicating copy to clipboard operation
SDL copied to clipboard

[SDL2]: Add an ability to prevent initialization of capture devices

Open Wohlstand opened this issue 1 year ago • 3 comments

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?

Wohlstand avatar Sep 13 '24 18:09 Wohlstand

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.

icculus avatar Dec 04 '24 19:12 icculus

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.

Wohlstand avatar Dec 04 '24 19:12 Wohlstand

And also I saw a smiliar case with other apps that use SDL2, and the problem is the same.

Wohlstand avatar Dec 04 '24 19:12 Wohlstand