mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-16 22:29:36 -05:00
Prepare to fix deprecation warning when using OBS 31
The following log message will be present in OBS 31 when CheckIfTrayIsDisabled() is called: DEPRECATION: obs_frontend_get_global_config is deprecated. Read from global or user configuration explicitly instead. It will be resolved when the minimum OBS version is bumped to OBS 31.
This commit is contained in:
@@ -123,27 +123,23 @@ MacroActionSystrayEdit::MacroActionSystrayEdit(
|
||||
|
||||
void MacroActionSystrayEdit::TitleChanged()
|
||||
{
|
||||
if (_loading || !_entryData) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto lock = LockContext();
|
||||
GUARD_LOADING_AND_LOCK();
|
||||
_entryData->_title = _title->text().toStdString();
|
||||
}
|
||||
|
||||
void MacroActionSystrayEdit::IconPathChanged(const QString &text)
|
||||
{
|
||||
if (_loading || !_entryData) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto lock = LockContext();
|
||||
GUARD_LOADING_AND_LOCK();
|
||||
_entryData->_iconPath = text.toStdString();
|
||||
}
|
||||
|
||||
void MacroActionSystrayEdit::CheckIfTrayIsDisabled()
|
||||
{
|
||||
#if LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(31, 0, 0)
|
||||
auto config = obs_frontend_get_user_config();
|
||||
#else
|
||||
auto config = obs_frontend_get_global_config();
|
||||
#endif
|
||||
if (!config) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user