215 Commits

Author SHA1 Message Date
Warchamp7
407944a27c frontend: Rearrange default dock positions 2025-12-19 14:43:44 -05:00
Sebastian Beckmann
f6a56227eb frontend: Remove implicit capture of "this" using "="
Implicitly capturing "this" with the capture default "=" is deprecated
with C++20. We fix this by either explicitly passing this, or by copying
the required members manually.
While this exposes some rather expensive copies like the QList
selectedItems in OBSBasic_Preview, it doesn't introduce them ("=" copies
implicitly).
2025-12-18 17:30:42 -05:00
Sebastian Beckmann
25f4fc9e70 frontend: Replace "=" capture with "this"
Implicit capture of 'this' with a capture default of '=' is deprecated
in C++20.

# Conflicts:
#	frontend/settings/OBSBasicSettings.cpp
#	frontend/settings/OBSHotkeyEdit.cpp
#	frontend/settings/OBSHotkeyWidget.cpp
2025-12-18 17:30:42 -05:00
Warchamp7
e7e32689a8 frontend: Use palette for Light theme audio mixer 2025-12-18 15:26:37 -05:00
Warchamp7
c8e74c9dec frontend: Round display size for projectors 2025-12-17 21:43:44 -05:00
Sebastian Beckmann
f80d35fa4a frontend: Remove "using namespace std" from headers
This is very dangerous as it propagates down everywhere the headers are
included in.
2025-12-17 18:51:35 -05:00
Sebastian Beckmann
a9634db561 frontend/cmake: Enable Qt strict mode
Qt strict mode disables APIs deemed "'suboptimal' or 'dangerous'" [1]
and "clearly undesirable" [2] by Qt that will be removed in the long
term.
Usages of the APIs in OBS have been removed in the previous commits, and
by setting this flag we keep ourselves from using them again.
The versioning works in a way where e.g. a new addition to this in 6.9
would only be disabled if at least 0x060900 is set. By setting 0xFF0000,
we're effectively disabling any APIs that are deemed to be bad in any
future Qt version (up to 255).
While this could lead to OBS not being buildable against bleeding edge
Qt, it also means that it will be noticed early. Should the disabled API
turn out to be too complex to remove, the value can be downgraded to the
last working one then.

[1] qt/qtbase@3a6c8e02b6
[2] qt/qtbase@f9163ae7a8
2025-12-17 16:35:45 -05:00
gxalpha
5129612b6c frontend,shared: Replace and disable contextless connect calls
# Conflicts:
#	frontend/OBSApp.cpp
2025-12-17 16:35:45 -05:00
gxalpha
876806bbf5 frontend: Replace and disable QString to QUrl casts 2025-12-17 16:35:45 -05:00
gxalpha
9b1d1493ab frontend,shared: Replace and disable QByteArray to char * casts 2025-12-17 16:35:45 -05:00
Sebastian Beckmann
63d7f7fb55 frontend: Replace #defines in YoutubeApiWrappers 2025-12-17 16:35:45 -05:00
Sebastian Beckmann
f9aec57091 frontend: Avoid unnecessary QString<->const char * conversions
SetComboByName, SetComboByValue and SetInvalidValue all pass their
parameters to Qt functions which only take QStrings. As a consequence,
we have cases we'd convert a QString to a const char* to call these
functions, only for the functions to implicitly convert them back into
QStrings. We can avoid this by passing QStrings directly. In cases where
we did actually pass const chars, the (implicit) conversion now just
takes place earlier.
2025-12-17 16:35:45 -05:00
Warchamp7
a4642cc532 frontend: Increase media playback slider fidelity 2025-12-17 15:56:27 -05:00
tytan652
c142571d5c frontend: Cleanup Qt GuiPrivate linkage
Remove unneeded linkages and guard needed ones for Qt versions earlier
than 6.9.0.
2025-12-17 15:04:49 -05:00
Sean DuBois
cd4d624ec3 obs-webrtc: Add Simulcast Support 2025-12-17 13:41:59 -05:00
Warchamp7
ff9b4eb099 frontend: Fix transition duration not loading correctly 2025-12-12 13:44:47 -05:00
Warchamp7
e3df8722bd frontend: Switch off deleted scenes immediately 2025-12-12 13:08:40 -05:00
Warchamp7
34a0a6a530 frontend: Remove crash handler earlier in shutdown 2025-12-04 15:05:23 -05:00
Dennis Sädtler
606e1932b8 frontend: Fix recursion during canvas removal causing crashes 2025-12-03 15:10:44 -05:00
Warchamp7
bd2024eb81 cmake: Fix order of frontend targets
Updates targets to be consistent in their order putting uppercase before lowercase
2025-12-01 16:40:34 -05:00
Warchamp7
14572498dc frontend: Adjust application shutdown logic
Improves app shutdown in a few ways, including separating out different
pieces of the OBSBasic close handler into their own functions.

Removes the crash handler sentinel earlier when the main window is closed,
preventing unclean shutdown warnings when a plugin causes issues. While not
ideal, the dialog is not useful when we cannot specify which plugin caused the
problem.

Increases shutdown priority of the main application so that when OBS interrupts
the session ending, CEF is not closed at the same time. This fixes a crash.

Additional safeguards and event handling to try to ensure a smoother shutdown.
2025-12-01 16:40:34 -05:00
shiina424
d97e5ad820 frontend: Rename scrollbar in Acri theme 2025-11-12 12:33:49 -05:00
shiina424
d6642384db frontend: Rename scrollbar in Classic theme 2025-11-12 12:33:49 -05:00
PatTheMav
13ba51a9ad frontend: Use Qt parent-child ownership in OAuth dialog
By explicitly setting the OAuth dialog as the parent of the CEF widget,
it will automatically by cleaned up as soon as the dialog is closed
itself.

This also detaches the destruction of the widget from the browser
cleanup code.
2025-10-17 14:31:38 +02:00
hongqingwan
85fa987f67 frontend: Fix runtime check failure issue
Fix an issue where the stack around the variable snapEnabled was
corrupted.

SPI_GETSNAPTODEFBUTTON should use BOOL, not bool.

Reference:
 * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfow
2025-09-26 14:31:08 -04:00
PatTheMav
e35b16cba9 frontend: Enable multitrack RTMP option for custom RTMP services
This removes the need to provide an undocumented launch argument to
enable custom RTMP service configurations to use multitrack encoding
and also provide a custom configuration.
2025-09-26 01:48:39 -04:00
Richard Stanway
efca325c2c frontend, plugins: Set default bitrate to 6000 kbps
The default of 2500 kbps was chosen 10 years ago and times have changed.
Logs and forums posts show that many users of OBS for recording don't
change their bitrate and end up with a 2.5 mbps recording which looks
terrible.

Now that service bitrate enforcement exists, this will be automatically
capped to the maximum bitrate for streaming services, so the only time
this should result in a problem is if the user's upload speed is the
limiting factor, hopefully rarer these days with increasing internet
speeds.
2025-09-17 19:56:04 -04:00
Joel Bethke
c4cccf7b7e frontend: Remove help text for shutdown check 2025-09-16 18:02:25 -04:00
Norihiro Kamae
4d42b88960 frontend/api: Remove obs_frontend_get_global_config from internal code 2025-09-15 17:17:55 -04:00
Penwywern
e216a0eab0 frontend: Don't attempt multitrack without config url 2025-09-15 16:47:44 -04:00
Warchamp7
a9226f81d9 frontend: Fix UI deadlock
There is a Qt bug introduced around Qt 6.8.3 that causes the application
to hang when double clicking the sources list and the Windows setting
'Snap mouse to default button in dialog boxes' is enabled. Work around
this by using a timer if the setting is enabled.
2025-09-15 16:06:38 -04:00
derrod
2c65cb82ea frontend: Remove "BETA" from Hybrid MP4/MOV and make them the default 2025-09-12 15:45:57 -04:00
Warchamp7
9a3fe95211 frontend: Update Plugin Manager v1 UI 2025-09-12 14:18:27 -04:00
Matt Gajownik
99c3a4b797 Update translations from Crowdin 2025-09-08 22:38:40 -04:00
Sebastian Beckmann
482778d532 frontend: Change renderer combo box to use custom data
While the Metal renderer is displayed as "Metal (Experimental)", the
"Experimental" part doesn't need to be stored to the config. Otherwise,
anyone having selected the Metal renderer will have it get unselected
once the "Experimental" part is removed, and presumably the people who
have it selected while it's experimental would also be the people who
would want it once it's stable.
2025-09-08 17:39:38 -04:00
PatTheMav
f932082112 frontend: Add Metal to available list of renderers in basic settings 2025-09-04 17:58:27 -04:00
Sebastian Beckmann
e4381755ca frontend/data: Remove unused context bar string 2025-09-04 14:48:30 -04:00
Sebastian Beckmann
22ce393680 shared/idian: Make title and description common to all row types 2025-09-04 14:17:02 -04:00
Sebastian Beckmann
fca07b4ce4 frontend: Include OBSIdianPlayground MOC
Also puts the include in the correct place in OBSBasic_MainControls.
2025-09-04 14:17:02 -04:00
Sebastian Beckmann
e05496462a frontend/themes: Remove Idian test rule 2025-09-04 14:17:02 -04:00
Sebastian Beckmann
affe09d250 frontend: Fix plugin manager module type loading 2025-09-03 15:34:26 -04:00
PatTheMav
e8d4224992 frontend: Change crash sentinel location to separate subdirectory
Putting the crash sentinel in the main "obs-studio" directory carries
the risk of unwanted deletion of files in the same directory, which
usually contains user configuration files like "user.ini" and
"global.ini".

Even though the code will ignore any file that does not start with the
crash sentinel prefix string, the code itself would allow changing the
prefix to "global.ini" and thus inadvertently delete the global
configuration file as well.

To further reduce the risk, this change will put the sentinels in a
separate sub-directory that should only ever contain sentinel files,
all of which can possibly deleted without any data loss for the user.
2025-09-03 13:01:44 -04:00
FiniteSingularity
a5fa416628 frontend: Fix plugin manager config loading crash
Current code isn't catching a parse error exception if an invalid config
file is loaded by the plugin manager. This change wraps the plugin
manager config json parse call with a try/catch, and handles invalid
config files by creating a new config file, and logs an error that the
existing config file is invalid.
2025-09-02 15:54:47 -04:00
tytan652
747f67e150 frontend: Do not enable crash log upload without log file
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
2025-09-02 15:28:33 -04:00
Sebastian Beckmann
527e2f291f frontend: Remove unneeded argument from log upload privacy notice 2025-09-02 14:57:41 -04:00
Norihiro Kamae
e647729592 frontend/api: Fix deprecation warning message for global config 2025-08-28 15:11:59 -04:00
FiniteSingularity
23b67268e7 frontend: Provide UI for phase 1 of plugin manager
For phase 1 of the plugin manager, the ability to toggle off/on plugins
to be loaded at launch is provided.

This commit adds a new Plugin Manager dialog which can be accessed from
the Tools menu, which shows a list of all installed 3rd party plugins
with a checkbox to toggle them off or on.  If a change is made, the user
is prompted to restart OBS. To allow this, the plugin manager uses a
json based config file stored in the OBS config directory. Additionally
for sources in the source tree, a sample UI has been provided that
indicates any sources whose parent module is disabled, by turning its
title red.
2025-08-28 14:29:10 -04:00
Ryan Foster
e187f9acee Revert "UI: Work around Qt dock restore crash"
This reverts commit 3dcf68f8ed.

The bug that this was meant to work around was most likely QTBUG-102718,
which was fixed in Qt 6.2.5, 6.3.1, and 6.4.0. The minimum version of Qt
we currently support is Qt 6.4.2 because it is what is available on
Ubuntu 24.04. Thus, we should not need this workaround now.

https://bugreports.qt.io/browse/QTBUG-102718
2025-08-25 18:50:16 -04:00
PatTheMav
c8ec906844 frontend: Change overflow texture rendering to be sRGB-aware
Current code assumes that the overflow texture and the render target
always share the same color format including transfer function.

This assumption is incorrect however as OBS might use a 16-bit floating
point texture with a linear gamma transfer function when a high-bitrate
format is selected. On top of that OBS Studio wants rendering code to
ensure that linear color blending is used throughout the application.

The DrawOverflow function had not been updated to reflect this. This
change brings it in line with other functions involved in preview
rendering, which enable automatic sRGB conversion for the framebuffer
and the texture used in the fragment shader.
2025-08-24 15:29:33 -04:00
Sebastian Beckmann
7685a0c78b frontend: Set cursor width for OBSHotkeyEdit to 0
This hides the cursor from the OBSHotkeyEdit spin boxes even when they
are in focus.
Uses a shared style owned by OBSApp.
2025-08-23 13:01:02 -04:00