Skip to content

Commit

Permalink
set to custom only if there is a custom
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jun 27, 2024
1 parent 6b86456 commit d7cb155
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common/device-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,12 @@ namespace rs2
auto itr = sub->options_metadata.find(RS2_OPTION_VISUAL_PRESET);
if (itr != sub->options_metadata.end())
{
itr->second.endpoint->set_option(RS2_OPTION_VISUAL_PRESET, RS2_RS400_VISUAL_PRESET_CUSTOM);
// Make sure we actually have a "Custom" preset
if( std::string( "Custom", 6 )
== itr->second.endpoint->get_option_value_description(
RS2_OPTION_VISUAL_PRESET,
RS2_RS400_VISUAL_PRESET_CUSTOM ) )
itr->second.endpoint->set_option(RS2_OPTION_VISUAL_PRESET, RS2_RS400_VISUAL_PRESET_CUSTOM);
}
}
}
Expand Down

0 comments on commit d7cb155

Please sign in to comment.