Sfoglia il codice sorgente

UI: Add OBSBasic::BackupScene() with scene param

Just a little inline helper that automatically converts it to a source
so callers don't have to manually do this each time.
jp9000 4 anni fa
parent
commit
008a7372d3
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      UI/window-basic-main.hpp

+ 6 - 0
UI/window-basic-main.hpp

@@ -864,6 +864,12 @@ public:
 	void CreateSceneUndoRedoAction(const QString &action_name,
 				       OBSData undo_data, OBSData redo_data);
 
+	static inline OBSData BackupScene(obs_scene_t *scene)
+	{
+		obs_source_t *source = obs_scene_get_source(scene);
+		return BackupScene(source);
+	}
+
 	void CreateFilterPasteUndoRedoAction(const QString &text,
 					     obs_source_t *source,
 					     obs_data_array_t *undo_array,