Optional ctrl key mod check when running view source with function name.

This commit is contained in:
Bartosz Taudul 2024-01-02 17:02:02 +01:00
parent 9a5fb0bb51
commit 4757d101fc
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 13 additions and 0 deletions

View File

@ -209,6 +209,18 @@ void View::ViewSource( const char* fileName, int line, const char* functionName
} }
} }
void View::ViewSourceCheckKeyMod( const char* fileName, int line, const char* functionName )
{
if( ImGui::GetIO().KeyCtrl )
{
ViewSource( fileName, line );
}
else
{
ViewSource( fileName, line, functionName );
}
}
void View::ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr ) void View::ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr )
{ {
assert( fileName || symAddr ); assert( fileName || symAddr );

View File

@ -113,6 +113,7 @@ public:
void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; }
void ViewSource( const char* fileName, int line ); void ViewSource( const char* fileName, int line );
void ViewSource( const char* fileName, int line, const char* functionName ); void ViewSource( const char* fileName, int line, const char* functionName );
void ViewSourceCheckKeyMod( const char* fileName, int line, const char* functionName );
void ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr ); void ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr );
bool ViewDispatch( const char* fileName, int line, uint64_t symAddr ); bool ViewDispatch( const char* fileName, int line, uint64_t symAddr );