Qt: minor camera config warning fixes

This commit is contained in:
Megamouse 2022-11-05 10:48:32 +01:00
parent 89de913e95
commit 4f5076346d
2 changed files with 7 additions and 3 deletions

View file

@ -7,10 +7,11 @@ LOG_CHANNEL(camera_log, "Camera");
cfg_camera g_cfg_camera; cfg_camera g_cfg_camera;
cfg_camera::cfg_camera() cfg_camera::cfg_camera()
: cfg::node()
#ifdef _WIN32 #ifdef _WIN32
: path(fs::get_config_dir() + "config/camera.yml") , path(fs::get_config_dir() + "config/camera.yml")
#else #else
: path(fs::get_config_dir() + "camera.yml") , path(fs::get_config_dir() + "camera.yml")
#endif #endif
{ {
} }

View file

@ -18,7 +18,10 @@ qt_camera_handler::qt_camera_handler() : camera_handler_base()
camera_log.success("Found camera: name=%s, description=%s", cameraInfo.deviceName().toStdString(), cameraInfo.description().toStdString()); camera_log.success("Found camera: name=%s, description=%s", cameraInfo.deviceName().toStdString(), cameraInfo.description().toStdString());
} }
g_cfg_camera.load(); if (!g_cfg_camera.load())
{
camera_log.notice("Could not load camera config. Using defaults.");
}
} }
qt_camera_handler::~qt_camera_handler() qt_camera_handler::~qt_camera_handler()