Commit Graph

28 Commits (master)

Author SHA1 Message Date
gxalpha b7a20cd5e4 UI: Add function to open privacy preferences on macOS 2022-07-31 18:14:41 +02:00
PatTheMav e15fdf69c0 UI: Add functions to check for and request macOS permissions
Adds functions to check and/or request specific macOS permissions
(audio device access, video device access, accessibility access, and
screen capture access).

By default only audio capture, video capture, and accessibility are
requested on launch - the first two have straight-forward "Yes/No"
prompts, the latter requires people to enable OBS in the settings
application (but is required for hotkey functionality, independent
of scene setups).
2022-07-26 14:20:34 +02:00
PatTheMav c1740e3636 UI: Add initialization to ensure compat between pthread and NSThread
Ensures that Cocoa knows that we intend to use multiple threads, per
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html#//apple_ref/doc/uid/10000057i-CH15-SW21
2022-07-25 17:27:07 +02:00
gxalpha 0fa7834bfc UI: Use libobs rosetta detection 2022-06-19 01:37:15 +02:00
gxalpha 41521b2816 UI: Move taskbar overlay functions into platform.hpp
Refactors the existing implementation for Windows into
platform-windows.cpp, allowing for other OS implementations in the
future.
2022-05-20 20:16:56 +10:00
gxalpha dde2fe209a UI: Remove InitApplicationBundle() function 2022-03-19 15:13:00 -07:00
PatTheMav 1f0f2be15e
UI: Update CMakeLists.txt for main OBS app 2022-03-16 23:11:58 +01:00
gxalpha 6d86b58ed7 UI: Simplify multi-instance check 2022-03-05 15:21:11 -08:00
Rodney b7a24d54c9
UI: Add warning on startup for running in Wine 2022-02-07 14:16:59 -08:00
Richard Stanway 076cd5d5d4 UI: Add option to hide OBS windows on Windows
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.
2022-01-22 15:14:16 -08:00
gxalpha 8298f040fe UI: Add Rosetta Detection
Adds a check that detects if OBS is running on Rosetta on macOS and logs
the result.
2022-01-04 01:57:02 -08:00
jp9000 7fffca945e Revert "UI: Remove macOS-Default Full Screen Menu Item"
This reverts commit cf445be44c.

Did not mean to merge this. #4768
2021-08-17 06:00:53 -07:00
gxalpha cf445be44c UI: Remove macOS-Default Full Screen Menu Item
macOS looks if the NSUserDefault NSFullScreenMenuItemEverywhere is set
to true, and if it is, it adds its own full screen menu item.
Sets this NSUserDefault to false since it defaults to true.
2021-08-17 05:58:29 -07:00
Ka Ho Ng f8aa02897f UI: Detect other instances of obs on FreeBSD
Detect other instances of the obs by creating an extra dummy thread,
named "OBS runonce". The process of threads enumeration of current user
is guarded by an O_EXLOCK file advisory lock when opening the lock file.
Such file lock would be dropped once the thread name is changed.

This should be usable on FreeBSD and possibly compile on DragonFly BSD.

fixes: #3053
2020-11-14 12:04:31 -08:00
Christian Lockley ad528bef17 UI: Detect other instances of obs on Linux
fixes: obsproject#3053
2020-10-30 11:50:47 -07:00
Mikhail Kochegarov 117d35433f UI: Detect other instances of obs on macOS
Detect other instances of the obs by inspecting running applications
with same bundle ID.

fixes: #3053
2020-10-16 05:48:37 -07:00
PatTheMav cab32e7e67 UI: Disable QT's implicit colourspace conversion on macOS
Fixes issues as described in https://bugreports.qt.io/browse/QTBUG-47660
and halves CPU usage of OBS' UI by about 40-50%.
2020-10-01 23:54:58 -07:00
jp9000 e93d44dd18 UI: Get actual projector monitor name on windows 2020-03-18 20:37:56 -07:00
Theodore Dubois c5b0da7d13 UI: Add missing function declaration
This broke the build, but due to an issue with CI this was not caught by
CI.
2020-02-09 17:25:31 -08:00
jp9000 f53df7da64 clang-format: Apply formatting
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.
2019-06-23 23:49:10 -07:00
DungFu 5cbc78b0a9 UI: Hide Dock Icon on Mac OSX when minimizing to tray
This hides the dock icon when minimizing OBS to the tray on OSX. This
also fixes the bugs with minimizing on startup (and hides the dock icon
correctly in that case as well).

Closes obsproject/obs-studio#1430
2018-08-17 10:34:11 -07:00
mntone 9ffdaff984 UI: Add memory usage to Stats window on linux/mac
Closes jp9000/obs-studio#953
2017-09-12 01:56:40 -07:00
jp9000 96ce9633e0 UI: Warn user if multiple instances of the UI are open
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.
2017-05-14 15:25:34 -07:00
jp9000 d0d9cc4254 UI: Add function to get current memory usage (win32) 2017-05-13 01:52:45 -07:00
mntone 9efd2b87aa UI: Add option to disable audio ducking on windows
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.

Closes jp9000/obs-studio#884
2017-05-03 11:05:30 -07:00
Warren Turkal f3eb8aacfe UI: Use Qt lib for screen info instead of x11 libs
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.
2016-10-03 23:50:13 -07:00
jp9000 eb1fecdd34 UI: Add media/image file drop support 2016-09-27 10:01:22 -07:00
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00