This uses the SetWindowDisplayAffinity API to hide windows from capture
applications (including OBS). This is not perfect - internal windows
such as context menus, combo box dropdowns, etc will still be displayed.
Even with these limitations, it should help people with single monitors
capture content with less interference from the OBS window.
This implementation is for Windows only but the code is generic enough
that adding other platforms should be straightforward.
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
Uses a named mutex to detect if multiple instances of the program are
open, and if so warns the user. When running in portable mode, uses a
separate unique mutex name mapped to the user's config directory to
ensure that no two portable builds use the same config directory. This
way, portable builds do not conflict with normal builds or other
separate portable builds.
The audio subsystem of windows is by default configured to lower the
volume of other things while a communications device (mic) is currently
active. This patch prevents that from being enabled with OBS. If the
user needs audio ducking enabled again for whatever reason, there is now
an option to re-enable it in advanced settings.
Closesjp9000/obs-studio#884
All of the monitor discovery logic can be implemented with Qt. This
change removes all the x11 implementations in favor of Qt and removes a
fair amount of platform specific code.