Skip to content

Commit

Permalink
Add file browser to FW logs XML path
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadMeir committed Mar 4, 2024
1 parent fd7890f commit 08789db
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion common/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,7 @@ namespace rs2
}

{
ImGui::Text("HWLoggerEvents.xml Path:");
ImGui::Text("FW logs XML file:");
ImGui::SameLine();
static char logpath[256];
memset(logpath, 0, 256);
Expand All @@ -2721,6 +2721,19 @@ namespace rs2
path_str = logpath;
temp_cfg.set(configurations::viewer::hwlogger_xml, path_str);
}

ImGui::SameLine();
if( ImGui::Button( "FW logs XML" ) )
{
auto ret = file_dialog_open(open_file, "XML file\0*.xml\0", NULL, NULL);
if( ret )
{
memset( logpath, 0, 256 );
memcpy( logpath, ret, std::min( 255, static_cast< int >( strlen( ret ) ) ) );
path_str = logpath;
temp_cfg.set( configurations::viewer::hwlogger_xml, path_str );
}
}
}

ImGui::Separator();
Expand Down

0 comments on commit 08789db

Please sign in to comment.