Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-10-06 18:35:07 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-10-06 19:12:50 +0300
commitec0757c03adc8efe2db55853642e7c119b483334 (patch)
treedb8b2ba0e58e0af72370a364bdcb589ccf06efe2 /profiler
parenta4e39f3d5f3acb33cccee09045b44012ebcca59c (diff)
Change file selector to work with callbacks.
Diffstat (limited to 'profiler')
-rw-r--r--profiler/src/main.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp
index d21ae81d..27f15b78 100644
--- a/profiler/src/main.cpp
+++ b/profiler/src/main.cpp
@@ -575,12 +575,10 @@ static void DrawContents()
#ifndef TRACY_NO_FILESELECTOR
if( ImGui::Button( ICON_FA_FOLDER_OPEN " Open saved trace" ) && !loadThread.joinable() )
{
- auto fn = tracy::Fileselector::OpenFile( "tracy", "Tracy Profiler trace file" );
- if( !fn.empty() )
- {
+ tracy::Fileselector::OpenFile( "tracy", "Tracy Profiler trace file", []( const char* fn ) {
try
{
- auto f = std::shared_ptr<tracy::FileRead>( tracy::FileRead::Open( fn.c_str() ) );
+ auto f = std::shared_ptr<tracy::FileRead>( tracy::FileRead::Open( fn ) );
if( f )
{
loadThread = std::thread( [f] {
@@ -609,7 +607,7 @@ static void DrawContents()
{
badVer.state = tracy::BadVersionState::ReadError;
}
- }
+ } );
}
if( badVer.state != tracy::BadVersionState::Ok )