mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-18 16:17:23 -05:00
Prepare for deprecations in OBS 31
See https://github.com/obsproject/obs-studio/pull/11164
This commit is contained in:
parent
c1ac9bb890
commit
354880ad52
|
|
@ -430,8 +430,7 @@ if(NOT OS_WINDOWS)
|
|||
target_compile_options(
|
||||
${LIB_NAME}
|
||||
PUBLIC -Wno-error=unused-parameter -Wno-error=conversion -Wno-error=shadow
|
||||
-Wno-error=float-conversion -Wno-error=enum-conversion
|
||||
-Wno-error=deprecated-declarations)
|
||||
-Wno-error=float-conversion -Wno-error=enum-conversion)
|
||||
endif()
|
||||
|
||||
# --- End of section ---
|
||||
|
|
|
|||
|
|
@ -93,7 +93,11 @@ static void reset(obs_sceneitem_t *item)
|
|||
info.bounds_type = OBS_BOUNDS_NONE;
|
||||
info.bounds_alignment = OBS_ALIGN_CENTER;
|
||||
vec2_set(&info.bounds, 0.0f, 0.0f);
|
||||
#if (LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(30, 1, 0))
|
||||
obs_sceneitem_set_info2(item, &info);
|
||||
#else
|
||||
obs_sceneitem_set_info(item, &info);
|
||||
#endif
|
||||
|
||||
obs_sceneitem_crop crop = {};
|
||||
obs_sceneitem_set_crop(item, &crop);
|
||||
|
|
@ -140,7 +144,11 @@ static void centerAlign(obs_sceneitem_t *item, obs_bounds_type boundsType)
|
|||
itemInfo.bounds_type = boundsType;
|
||||
itemInfo.bounds_alignment = OBS_ALIGN_CENTER;
|
||||
|
||||
#if (LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(30, 1, 0))
|
||||
obs_sceneitem_set_info2(item, &itemInfo);
|
||||
#else
|
||||
obs_sceneitem_set_info(item, &itemInfo);
|
||||
#endif
|
||||
}
|
||||
|
||||
enum class CenterType {
|
||||
|
|
@ -241,7 +249,11 @@ void MacroActionSceneTransform::Transform(obs_scene_item *item)
|
|||
case Action::MANUAL_TRANSFORM:
|
||||
ApplySettings(_transformString); // Resolves variables
|
||||
obs_sceneitem_defer_update_begin(item);
|
||||
#if (LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(30, 1, 0))
|
||||
obs_sceneitem_set_info2(item, &_info);
|
||||
#else
|
||||
obs_sceneitem_set_info(item, &_info);
|
||||
#endif
|
||||
obs_sceneitem_set_crop(item, &_crop);
|
||||
obs_sceneitem_defer_update_end(item);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ std::string GetSceneItemTransform(obs_scene_item *item)
|
|||
{
|
||||
struct obs_transform_info info;
|
||||
struct obs_sceneitem_crop crop;
|
||||
#if (LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(30, 1, 0))
|
||||
obs_sceneitem_get_info2(item, &info);
|
||||
#else
|
||||
obs_sceneitem_get_info(item, &info);
|
||||
#endif
|
||||
obs_sceneitem_get_crop(item, &crop);
|
||||
auto size = getSceneItemSize(item);
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,11 @@ void SetTransformSetting(obs_scene_item *source,
|
|||
struct obs_transform_info info = {};
|
||||
struct obs_sceneitem_crop crop = {};
|
||||
|
||||
#if (LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(30, 1, 0))
|
||||
obs_sceneitem_get_info2(source, &info);
|
||||
#else
|
||||
obs_sceneitem_get_info(source, &info);
|
||||
#endif
|
||||
obs_sceneitem_get_crop(source, &crop);
|
||||
|
||||
if (id == "alignment") {
|
||||
|
|
@ -260,7 +264,11 @@ void SetTransformSetting(obs_scene_item *source,
|
|||
}
|
||||
|
||||
obs_sceneitem_defer_update_begin(source);
|
||||
#if (LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(30, 1, 0))
|
||||
obs_sceneitem_set_info2(source, &info);
|
||||
#else
|
||||
obs_sceneitem_set_info(source, &info);
|
||||
#endif
|
||||
obs_sceneitem_set_crop(source, &crop);
|
||||
obs_sceneitem_defer_update_end(source);
|
||||
obs_sceneitem_force_update_transform(source);
|
||||
|
|
|
|||
|
|
@ -26,12 +26,8 @@ if(OS_WINDOWS)
|
|||
else()
|
||||
target_compile_options(
|
||||
libremidi
|
||||
PUBLIC -Wno-error=conversion
|
||||
-Wno-error=unused-result
|
||||
-Wno-error=shadow
|
||||
-Wno-error=unused-parameter
|
||||
-Wno-error=unused-variable
|
||||
-Wno-error=deprecated-declarations
|
||||
PUBLIC -Wno-error=conversion -Wno-error=unused-result -Wno-error=shadow
|
||||
-Wno-error=unused-parameter -Wno-error=unused-variable
|
||||
-Wno-error=sign-compare)
|
||||
if(OS_MACOS)
|
||||
target_compile_options(libremidi PUBLIC -Wno-error=vla-extension)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user