mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-20 05:01:51 -04:00
UI: Add missing files dialog
This commit is contained in:
1 parent
fb95e1d1e9
commit
3273472019
13 files changed
+899
-1
No files matched your search
@@ -51,6 +51,7 @@
|
||||
#include "window-log-reply.hpp"
|
||||
#include "window-projector.hpp"
|
||||
#include "window-remux.hpp"
|
||||
#include "window-missing-files.hpp"
|
||||
#include "qt-wrappers.hpp"
|
||||
#include "context-bar-controls.hpp"
|
||||
#include "obs-proxy-style.hpp"
|
||||
@@ -970,7 +971,19 @@ void OBSBasic::Load(const char *file)
|
||||
obs_data_array_push_back_array(sources, groups);
|
||||
}
|
||||
|
||||
obs_load_sources(sources, nullptr, nullptr);
|
||||
obs_missing_files_t *files = obs_missing_files_create();
|
||||
|
||||
auto cb = [](void *private_data, obs_source_t *source) {
|
||||
obs_missing_files_t *f = (obs_missing_files_t *)private_data;
|
||||
obs_missing_files_t *sf = obs_source_get_missing_files(source);
|
||||
|
||||
obs_missing_files_append(f, sf);
|
||||
obs_missing_files_destroy(sf);
|
||||
|
||||
UNUSED_PARAMETER(source);
|
||||
};
|
||||
|
||||
obs_load_sources(sources, cb, files);
|
||||
|
||||
if (transitions)
|
||||
LoadTransitions(transitions);
|
||||
@@ -1114,6 +1127,14 @@ retryScene:
|
||||
|
||||
LogScenes();
|
||||
|
||||
if (obs_missing_files_count(files) > 0) {
|
||||
OBSMissingFiles *miss = new OBSMissingFiles(files, this);
|
||||
miss->show();
|
||||
miss->raise();
|
||||
} else {
|
||||
obs_missing_files_destroy(files);
|
||||
}
|
||||
|
||||
disableSaving--;
|
||||
|
||||
if (api) {
|
||||
|
||||
Reference in new issue
Block a user