Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions SerialPrograms/Source/CommonFramework/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,6 @@ int run_program(int argc, char *argv[]){
logger.log(error.message(), COLOR_RED);
}

// Load the Switch framework settings now, not only when their panel is opened.
OptionsPanelWrapper<NintendoSwitch::ConsoleSettingsPanel>().make_panel()->load_json_from_global();

// Preload a bunch of stuff now so they are ready later.
SerialPortPoller::instance().ports();
get_all_cameras();

// Force all the Qt thread pools to be constructed now on the main thread.
GlobalThreadPools::qt_worker_threadpool();
GlobalThreadPools::qt_event_threadpool();
Expand Down Expand Up @@ -246,10 +239,19 @@ int run_program(int argc, char *argv[]){
return 1;
}

// Tests need no console, serial port or camera. Return before touching
// them, so tests can run while another instance holds the devices.
if (GlobalSettings::instance().COMMAND_LINE_TEST_MODE){
return run_command_line_tests(augment_test_color_distortions, test_substring);
}

// Load the Switch framework settings now, not only when their panel is opened.
OptionsPanelWrapper<NintendoSwitch::ConsoleSettingsPanel>().make_panel()->load_json_from_global();

// Preload a bunch of stuff now so they are ready later.
SerialPortPoller::instance().ports();
get_all_cameras();

// Check whether the hardware is powerful enough to run this program.
if (!check_hardware()){
return 1;
Expand Down
Loading