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

Pass global config to View.

This commit is contained in:
Bartosz Taudul
2023-05-01 14:41:38 +02:00
parent 1dd0341cff
commit a2d470690f
3 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ namespace tracy
double s_time = 0;
View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config )
: m_worker( addr, port )
, m_staticView( false )
, m_viewMode( ViewMode::LastFrames )
@@ -68,7 +68,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char*
InitTextEditor();
}
View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config )
: m_worker( f )
, m_filename( f.GetFilename() )
, m_staticView( true )
+3 -2
View File
@@ -13,6 +13,7 @@
#include "TracyBadVersion.hpp"
#include "TracyBuzzAnim.hpp"
#include "TracyConfig.hpp"
#include "TracyDecayValue.hpp"
#include "TracyFileWrite.hpp"
#include "TracyShortPtr.hpp"
@@ -101,8 +102,8 @@ public:
using SetScaleCallback = void(*)( float, ImFont*&, ImFont*&, ImFont*& );
using AttentionCallback = void(*)();
View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb );
View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb );
View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config );
View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config );
~View();
bool Draw();