|
7 | 7 | #include "Common/Cpp/Concurrency/AsyncTask.h" |
8 | 8 | #include "Common/Cpp/Exceptions.h" |
9 | 9 | #include "Common/Cpp/ImageResolution.h" |
| 10 | +#include "Globals.h" |
| 11 | +#include "GlobalSettingsPanel.h" |
10 | 12 | #include "PersistentSettings.h" |
11 | 13 | #include "Tests/CommandLineTests.h" |
12 | 14 | #include "ErrorReports/ProgramDumper.h" |
|
18 | 20 | #include "Logging/Logger.h" |
19 | 21 | #include "Logging/OutputRedirector.h" |
20 | 22 | //#include "Tools/StatsDatabase.h" |
21 | | -#include "Globals.h" |
22 | | -#include "GlobalSettingsPanel.h" |
23 | 23 | //#include "Windows/DpiScaler.h" |
24 | 24 | #include "Startup/SetupSettings.h" |
25 | 25 | #include "Startup/NewVersionCheck.h" |
| 26 | +#include "CommonFramework/VideoPipeline/Backends/CameraImplementations.h" |
26 | 27 | #include "CommonTools/OCR/OCR_RawOCR.h" |
27 | 28 | #include "Windows/MainWindow.h" |
28 | 29 |
|
@@ -73,6 +74,9 @@ int main(int argc, char *argv[]){ |
73 | 74 | OutputRedirector redirect_stdout(std::cout, "stdout", Color()); |
74 | 75 | OutputRedirector redirect_stderr(std::cerr, "stderr", COLOR_RED); |
75 | 76 |
|
| 77 | + // Preload all the cameras now so we don't hang the UI later on. |
| 78 | + get_all_cameras(); |
| 79 | + |
76 | 80 | QDir().mkpath(QString::fromStdString(SETTINGS_PATH())); |
77 | 81 | QDir().mkpath(QString::fromStdString(SCREENSHOTS_PATH())); |
78 | 82 |
|
|
0 commit comments