Commit Graph

2854 Commits

Author SHA1 Message Date
Richard Stanway
bb7ca3c2c3 UI: Add mutex for writing to the log file
fstream is not thread-safe and the act of writing the string and the
newline are two separate operations which could execute concurrently in
multiple threads, resulting in lines joining together followed by two
newlines. Due to the presence of a static mutex, this also removes
inline on the function.
2023-03-04 15:34:17 -08:00
derrod
8ba646c842 updater: Check if awaited instance matches current install
Also replaces any secondary usages of GetCurrentDirectory with cached
static variable.

Co-Authored-By: Richard Stanway <r1ch@r1ch.net>
2023-03-03 21:47:56 +00:00
derrod
08733a0e1a updater: Remove 32-bit Support 2023-03-01 20:18:03 -05:00
derrod
d15dce99d0 updater: Multi-threaded delta patching 2023-03-01 16:20:43 -05:00
derrod
60844505d0 UI: Replace uses of token-pasting operator 2023-03-01 20:39:53 +01:00
Norihiro Kamae
22a98c279e UI: Fix tabstops on settings dialog 2023-03-01 10:50:10 -05:00
derrod
77e4c1c305 cmake: Check if Sparkle options are non-empty 2023-02-27 13:06:26 -05:00
PatTheMav
953e0eda53 UI: Remove unused variable 2023-02-27 18:40:52 +01:00
tytan652
6734c9cbc8 UI: Stop virtual camera if active while exiting
Avoid potential memory leaks and crashes.
2023-02-25 16:06:59 -08:00
tytan652
0f560a9136 UI: Fix scene/source in virtual camera config if renamed 2023-02-25 16:06:59 -08:00
tytan652
501a3e926d UI: Refactor Virtual Camera source selector dialog 2023-02-25 16:06:59 -08:00
derrod
e5690a1f65 UI: Use unordered_map for hotkey duplicate detection 2023-02-25 15:28:35 -08:00
derrod
af4012e1b1 UI: Set QT_NO_SUBTRACTOPAQUESIBLINGS env var
This speeds up drawing the hotkey list *significantly* and doesn't seem
to break anything else. But it is kind of a hack.
2023-02-25 15:25:31 -08:00
derrod
c3543273e4 UI: Defer creation of hotkey dupe icon until needed 2023-02-25 15:21:29 -08:00
derrod
11e5afa2b2 UI: Support platform-specific WhatsNew entries 2023-02-25 15:08:27 -08:00
tytan652
2a2d8fc1bb UI: Remove mf_aac references 2023-02-24 14:34:34 +01:00
gxalpha
5d0a1c0010 UI: Don't load global plugins in portable mode
Portable mode is meant to be separated from the rest of the system, and
as such it doesn't make sense to load globally installed plugins there.

On Windows, there currently are only two major plugins that install
themselves there. Plugins installing themselves there is good, but it
currently also means that even portable instances load them which can
make testing and debugging in a clean environment annoying.
2023-02-24 14:11:21 +01:00
gxalpha
d405193aeb UI: Only set portable mode variable if supported
Previously, all the functions of portable mode wouldn't work if compiled
without it, but the log still show it as enabled if the argument was
set. This could lead to confusion.
Additionally, we don't even show the option in the help string (--help),
so it should just be a no-op.
2023-02-24 14:11:21 +01:00
Georges Basile Stavracas Neto
a1a98f9cfd plugins: Drop win-ivcam
Apparently this was a prototype from Intel that never really
properly launched. Remove the plugin.
2023-02-24 14:04:29 +01:00
jpark37
463bf0dff5 libobs,UI: Add P216/P416 pixel formats
Will be useful for ProRes.
2023-02-21 18:48:44 +01:00
gxalpha
4bcd86b395 UI: Disable replay buffer checkbox when using custom FFmpeg 2023-02-20 23:46:59 +01:00
derrod
644b73eb46 UI: Add confirmation dialog for resetting properties 2023-02-20 23:46:01 +01:00
gxalpha
8d4a0b3645 UI: Use valueChanged() signal for T-Bar everywhere
The sliderMoved signal doesn't trigger when clicking on the slider, only
the valueChanged signal. According to QTBUG-72995 this is intentional,
since the documentation states that sliderDown also needs to be true for
the sliderMoved signal to be triggered. As for why sliderDown isn't true
when clicking, or why that would even be necessary for a signal that
should trigger when the slider is moved (and it very clearly moves)
remains a mystery.

Also gets rid of the wrong usage of the on_foo_bar slot declaration,
which should only be used for signals where the sender is part of a UI
file and it gets connected automatically. While it of course is possible
to connect it manually, this is against convention and can cause
confusion. In this case it was particularly wrong since even if tBar was
part of a UI file (which it isn't), the method should have been called
on_tBar_valueChanged instead of on_tbar_position_valueChanged.
2023-02-20 19:10:32 +01:00
shiina424
a44700871b UI: Fix window text when disabled in dark theme 2023-02-20 12:15:04 -05:00
derrod
2b33fb3ad2 UI: Massive improve hotkey search performance 2023-02-19 15:41:54 -08:00
gxalpha
19a0afe526 UI: Don't double-delete children of deleted widgets
These widgets are all children of updateSettingsGroupBox, meaning they
get deleted when updateSettingsGroupBox gets deleted. This means that
the first two calls are unnecessary and the third one segfaults as
updateChannelLabel is gone already.
Just delete the parent widget instead.
2023-02-19 20:39:47 +01:00
bin
27981b15e9 UI: Fix compile error when obs-browser disabled 2023-02-19 20:39:23 +01:00
gxalpha
e438037960 UI: Use native color dialog on macOS 2023-02-19 04:10:51 +01:00
tytan652
9e6a482c66 UI: Fix button callback in OBSPropertiesView created with an id
Before calling the button callback, two values are null-checked but when
the property is created with an id (const char*). Those values are null
which prevent the callback from being called.
2023-02-18 17:47:19 -08:00
derrod
9d71d2f7fd cmake: Remove ENABLE_SPARKLE_UPDATER option
Since public key and appcast are now options we simply rely on those to
decide whether or not to enable Sparkle.
2023-02-19 01:35:56 +01:00
derrod
12a27d8b99 UI: Add update channels (macOS) 2023-02-19 01:35:56 +01:00
derrod
0972da9e1a UI: Merge win-update and nix-update 2023-02-19 01:35:56 +01:00
tytan652
64176daaf4 UI: Force Wayland usage on Ubuntu GNOME
XDG_CURRENT_DESKTOP is set to "ubuntu:GNOME" on Ubuntu custom version of
GNOME.
2023-02-18 16:20:39 -08:00
PatTheMav
8b0843803e UI: Remove unused variables 2023-02-18 15:22:33 -08:00
gxalpha
623af15821 UI: Connect Reset button in Transform dialog with main window directly 2023-02-18 15:19:21 -08:00
cg2121
64d4ae0106 UI: Remove bitness strings
This removes the bitness strings from the title bar and about dialog.
2023-02-18 15:09:11 -08:00
derrod
b44910726d UI: Defer Settings window hotkey loading 2023-02-18 15:04:23 -08:00
bin
559925ebaa UI: Check item whether selected before select
To prevent item from being selected again,
then mess up the qt internal list order.
2023-02-15 23:09:42 +01:00
gxalpha
9afc3cabca UI: Refactor / Clean up addNudge 2023-02-15 14:11:46 -05:00
Richard Stanway
e9504326f9 UI: Remove unnecessary null checks 2023-02-15 13:40:13 -05:00
Richard Stanway
2ac43052f9 UI: Fix memory leak of remux window 2023-02-15 13:40:13 -05:00
Richard Stanway
bff7928b50 UI: Avoid division by zero when calculating slider position
Detected by UBSan.
2023-02-15 13:40:13 -05:00
Richard Stanway
1f278bb18b UI: Set remux entry state before adding to queue
When adding to the queue, this triggers rowCountChanged which then
calls canClearFinished, reading undefined memory for state if this is
not set. The correct state is set immediately after by checkInputPath.

Detected by UBSan.
2023-02-15 13:40:13 -05:00
Richard Stanway
7c8acd48a9 UI: Improved implementation for sorting filters menu
Rather than finding the insertion point and iterating the vector for
each item, let's sort it afterwards.
2023-02-15 12:48:08 -05:00
bin
60e014e0e3 UI: Correct browse behavior in non-empty input edit line 2023-02-15 11:22:03 -05:00
gxalpha
c24ec240af UI: Remove unused Qt crash reporter code
The crash reporter made with Qt was introduced in 824c7b0, but then was
quickly replaced by a native OS implementation in d42a7ce. This code has
been lying around ever since.
2023-02-13 10:34:18 -05:00
cg2121
7a838e877f UI: Fix scene item edit drag & drop bug
If an user exits the source tree edit mode, without changing the name,
the scene item would become undraggable until the scene is refreshed.
We were setting the focus to just the label, not the whole widget.
2023-02-12 02:46:12 -08:00
gxalpha
3e4bbe85c8 UI: Remove workaround for current scene being deselectable on Qt 6.4.3+
Qt 6.2 introduced an issue where SingleSelection item views would
deselect the current item if the user clicked on empty area in the
widget.
This was very confusing in the scene tree as it was now possible to
unselect the current scene. A workaround for this in OBS was added in
08e4ee6 and expanded on in dc30cf0, but being quite hacky it never was
the perfect solution.
I since dug into Qt and fixed the issue upstream in qt/qtbase@f11e5435c7
for Qt 6.4.3 and newer, so we can remove the workaround when using those
versions (with the long term goal of removing the code altogether).
2023-02-11 16:01:27 -08:00
derrod
5bdf492f8a UI: Avoid excessive config reads when drawing preview 2023-02-11 15:58:40 -08:00
Ilya Melamed
213ce75328 UI: Add check for null widgetForAction result
In some cases, `QToolbar::widgetForAction` may return `nullptr`. This
causes a crash on affected system.

To mitigate this, we check for `widgetForAction` result and skip
operating on a NULL widget.
2023-02-11 15:56:19 -08:00