diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 4369c9737..0c4d597a7 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -90,6 +90,7 @@ bool opt_allow_opengl = false; bool opt_always_on_top = false; bool opt_disable_high_dpi_scaling = false; bool opt_disable_updater = false; +bool opt_disable_missing_files_check = false; string opt_starting_collection; string opt_starting_profile; string opt_starting_scene; @@ -1497,6 +1498,11 @@ bool OBSApp::IsUpdaterDisabled() return opt_disable_updater; } +bool OBSApp::IsMissingFilesCheckDisabled() +{ + return opt_disable_missing_files_check; +} + #ifdef __APPLE__ #define INPUT_AUDIO_SOURCE "coreaudio_input_capture" #define OUTPUT_AUDIO_SOURCE "coreaudio_output_capture" @@ -2697,6 +2703,10 @@ int main(int argc, char *argv[]) } else if (arg_is(argv[i], "--disable-updater", nullptr)) { opt_disable_updater = true; + } else if (arg_is(argv[i], "--disable-missing-files-check", + nullptr)) { + opt_disable_missing_files_check = true; + } else if (arg_is(argv[i], "--disable-high-dpi-scaling", nullptr)) { opt_disable_high_dpi_scaling = true; @@ -2720,6 +2730,7 @@ int main(int argc, char *argv[]) "--always-on-top: Start in 'always on top' mode.\n\n" "--unfiltered_log: Make log unfiltered.\n\n" "--disable-updater: Disable built-in updater (Windows/Mac only)\n\n" + "--disable-missing-files-check: Disable the missing files dialog which can appear on startup.\n\n" "--disable-high-dpi-scaling: Disable automatic high-DPI scaling\n\n"; #ifdef _WIN32 @@ -2752,6 +2763,14 @@ int main(int argc, char *argv[]) os_file_exists(BASE_PATH "/disable_updater") || os_file_exists(BASE_PATH "/disable_updater.txt"); } + + if (!opt_disable_missing_files_check) { + opt_disable_missing_files_check = + os_file_exists(BASE_PATH + "/disable_missing_files_check") || + os_file_exists(BASE_PATH + "/disable_missing_files_check.txt"); + } #endif upgrade_settings(); diff --git a/UI/obs-app.hpp b/UI/obs-app.hpp index 4f681f394..6592d5bbc 100644 --- a/UI/obs-app.hpp +++ b/UI/obs-app.hpp @@ -150,6 +150,7 @@ public: std::string GetVersionString() const; bool IsPortableMode(); bool IsUpdaterDisabled(); + bool IsMissingFilesCheckDisabled(); const char *InputAudioSource() const; const char *OutputAudioSource() const; diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index a398f9d24..54e1002a8 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -1173,7 +1173,8 @@ retryScene: LogScenes(); - if (obs_missing_files_count(files) > 0) { + if (obs_missing_files_count(files) > 0 && + !App()->IsMissingFilesCheckDisabled()) { /* the window hasn't fully initialized by this point on macOS, * so put this at the end of the current task queue. Fixes a * bug where the window be behind OBS on startup */