Show dialogs after OBS_FRONTEND_EVENT_FINISHED_LOADING is fired
Some checks failed
debian-build / build (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled

This commit is contained in:
WarmUpTill
2026-02-23 17:18:15 +01:00
committed by WarmUpTill
parent 4966802f14
commit ff98ec36d6
5 changed files with 57 additions and 49 deletions

View File

@@ -126,26 +126,13 @@ bool ShouldSkipPluginStartOnUncleanShutdown()
// or crashing.
// Therefore, we ask the user whether they want to start the plugin
// asynchronously.
//
// On macOS, an additional QTimer::singleShot wrapper is required for
// this to work correctly.
static const auto showDialogWrapper = [](void *) {
#ifdef __APPLE__
QTimer::singleShot(0,
static_cast<QMainWindow *>(
obs_frontend_get_main_window()),
[]() {
#endif
askForStartupSkip();
#ifdef __APPLE__
});
#endif
askForStartupSkip();
};
std::thread t([]() {
AddFinishedLoadingStep([]() {
obs_queue_task(OBS_TASK_UI, showDialogWrapper, nullptr, false);
});
t.detach();
return true;
}