1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

PR feedback: write the name into the tracy file

This commit is contained in:
joshuakr
2021-01-21 18:32:03 -08:00
parent db83fc443f
commit c96f01956d
3 changed files with 12 additions and 7 deletions
+9 -5
View File
@@ -194,11 +194,15 @@ int main( int argc, char** argv )
printf( "\33[2KProcessing...\r" );
fflush( stdout );
auto program = input;
while( *program ) program++;
program--;
while( program > input && ( *program != '/' || *program != '\\' ) ) program--;
tracy::Worker worker( program, timeline, messages, plots, threadNames );
auto&& getFilename = [](const char* in) {
auto out = in;
while (*out) ++out;
--out;
while (out > in && (*out != '/' || *out != '\\')) out--;
return out;
};
tracy::Worker worker( getFilename(output), getFilename(input), timeline, messages, plots, threadNames );
auto w = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output, clev ) );
if( !w )