mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Qt: Fix camera id and format when default is selected
This commit is contained in:
parent
441b324afe
commit
7ea64b53ad
@ -298,13 +298,16 @@ void qt_camera_handler::update_camera_settings()
|
|||||||
// Update camera if possible. We can only do this if it is already loaded.
|
// Update camera if possible. We can only do this if it is already loaded.
|
||||||
if (m_camera && m_camera->isAvailable())
|
if (m_camera && m_camera->isAvailable())
|
||||||
{
|
{
|
||||||
|
// Get camera id. Use camera id of Qt default if the "Default" camera is selected.
|
||||||
|
const std::string camera_id = (m_camera_id == g_cfg.io.camera_id.def) ? QMediaDevices::defaultVideoInput().id().toStdString() : m_camera_id;
|
||||||
|
|
||||||
// Load selected settings from config file
|
// Load selected settings from config file
|
||||||
bool success = false;
|
bool success = false;
|
||||||
cfg_camera::camera_setting cfg_setting = g_cfg_camera.get_camera_setting(m_camera_id, success);
|
cfg_camera::camera_setting cfg_setting = g_cfg_camera.get_camera_setting(camera_id, success);
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
camera_log.notice("Found config entry for camera \"%s\"", m_camera_id);
|
camera_log.notice("Found config entry for camera \"%s\" (m_camera_id='%s')", camera_id, m_camera_id);
|
||||||
|
|
||||||
// List all available settings and choose the proper value if possible.
|
// List all available settings and choose the proper value if possible.
|
||||||
const double epsilon = 0.001;
|
const double epsilon = 0.001;
|
||||||
|
Loading…
Reference in New Issue
Block a user