mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-29 21:46:08 +00:00
Add more Timeline options to the defaults.
This commit is contained in:
@@ -27,6 +27,9 @@ void LoadConfig()
|
||||
if( ini_sget( ini, "timeline", "forceColors", "%d", &v ) ) s_config.forceColors = v;
|
||||
if( ini_sget( ini, "timeline", "ghostZones", "%d", &v ) ) s_config.ghostZones = v;
|
||||
if( ini_sget( ini, "timeline", "shortenName", "%d", &v ) ) s_config.shortenName = v;
|
||||
if( ini_sget( ini, "timeline", "drawSamples", "%d", &v ) ) s_config.drawSamples = v;
|
||||
if( ini_sget( ini, "timeline", "drawContextSwitches", "%d", &v ) ) s_config.drawContextSwitches = v;
|
||||
if( ini_sget( ini, "timeline", "plotHeight", "%d", &v ) ) s_config.plotHeight = v;
|
||||
if( ini_sget( ini, "timeline", "horizontalScrollMultiplier", "%lf", &v1 ) && v1 > 0.0 ) s_config.horizontalScrollMultiplier = v1;
|
||||
if( ini_sget( ini, "timeline", "verticalScrollMultiplier", "%lf", &v1 ) && v1 > 0.0 ) s_config.verticalScrollMultiplier = v1;
|
||||
if( ini_sget( ini, "memory", "limit", "%d", &v ) ) s_config.memoryLimit = v;
|
||||
@@ -62,6 +65,9 @@ bool SaveConfig()
|
||||
fprintf( f, "forceColors = %i\n", (int)s_config.forceColors );
|
||||
fprintf( f, "ghostZones = %i\n", (int)s_config.ghostZones );
|
||||
fprintf( f, "shortenName = %i\n", s_config.shortenName );
|
||||
fprintf( f, "drawSamples = %i\n", s_config.drawSamples );
|
||||
fprintf( f, "drawContextSwitches = %i\n", s_config.drawContextSwitches );
|
||||
fprintf( f, "plotHeight = %i\n", s_config.plotHeight );
|
||||
fprintf( f, "horizontalScrollMultiplier = %lf\n", s_config.horizontalScrollMultiplier );
|
||||
fprintf( f, "verticalScrollMultiplier = %lf\n", s_config.verticalScrollMultiplier );
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ struct Config
|
||||
int shortenName = (int)ShortenName::NoSpaceAndNormalize;
|
||||
bool drawSamples = true;
|
||||
bool drawContextSwitches = true;
|
||||
int plotHeight = 100;
|
||||
bool saveUserScale = false;
|
||||
float userScale = 1.0f;
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ void View::SetupConfig()
|
||||
m_vd.shortenName = (ShortenName)s_config.shortenName;
|
||||
m_vd.drawSamples = s_config.drawSamples;
|
||||
m_vd.drawContextSwitches = s_config.drawContextSwitches;
|
||||
m_vd.plotHeight = s_config.plotHeight;
|
||||
}
|
||||
|
||||
void View::Achieve( const char* id )
|
||||
|
||||
@@ -848,7 +848,7 @@ void View::DrawOptions()
|
||||
"There is no UI yet to set those items, except this button which saves the default for all of them.\n\n"
|
||||
"For now, you can also manually adjust those defaults by editing the config file at:"
|
||||
);
|
||||
TextDisabledUnformatted(fn);
|
||||
TextDisabledUnformatted( fn );
|
||||
ImGui::EndTooltip();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user