On 10.15, if a user activates secure input of some sort, the hotkey code
will begin to crash inside of any Apple function related to hotkeys,
even after secure input has ended. This does not appear to be the fault
of OBS; the reason to this is still as of yet unknown, but is suspected
to be a bug inside of Apple code that's a new regression as of 10.15.
So for the time being as a temporary solution to the crash, simply
disable external hotkey support once secure input has been detected.
Because of this issue, the hotkey code should probably be replaced by a
different method of tracking hotkeys, perhaps InstallEventHandler for
example. This commit is little more than a bandaid to the crash.
Signal only needs to be connected once, not every keystroke.
Also commit data only when text widget focus is lost to fix cursor
moving to the end of the string after every keystroke.
Previous fix in #2547 altered id before they were handed off to
callbacks and v4l2 wont strip its own flags from ids resulting in
invalid ids in the ioctl.
Instead add cleanup section and jump all branches there before looping.
(Jim edit: I'm changing this entire function so that it isn't horrible.)
Previously, the importer assumed scenes had fields that sources did for
audio, namely volume, sync, mute and monitoring type. SL scenes do not
have these fields. This resulted in mistakes in importing, such as
imported scenes having a volume of 0.0.
This change gets rid of the non-existent fields, and explicitly sets the
volume of the scenes to 1.0 as a precaution.
v4l2_ioctl will clear the V4L2_CTRL_FLAG_NEXT_CTRL flag resulting in
infinite loops for any driver that reported readonly, disabled, or
volitile controls.
Before this change, opening up a fullscreen projector would have the
wrong window title (Windowed Projector). This was because the call to
update the window title was called before a monitor is set, and the
title is determined by whether a monitor is set.
This change moves the update title call to after the geometry or monitor
gets set, ensuring the window title is correct.
Not all devices return PKEY_AudioEngine_DeviceFormat properties.
Per MSDN, if the PROPERTYKEY referenced in key is not present in
the property store, this method returns S_OK and the vt member of
the structure pointed to by pv is set to VT_EMPTY.