The problem is I need to do multiple thinks conditionally on the private boolean being toggled. Ideally I could have a single "if false" check that runs multiple commands under it:
- If private boolean false
- set private boolean true
- capture devices
- change devices
If I just set the private boolean to true first then I can't conditionally capture and change as well.
Maybe I need an additional global boolean so I can use the private boolean as my mutex and the global boolean to track capture state.