mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-03 05:46:26 -05:00
UI: Initialize Stats window values after OBSInit/reset
When the statistics window starts up for the first time, it reset values at that very moment so that stray lagged frames due to OBS' startup wouldn't be displayed. However, that's really a bad place to reset those values because the user could want to view the stats window after a long stream, and having those values reset when he/she views the window for the first time would sort of make the point of viewing your stats moot. Instead, reset the values only when applicable, such as after OBSInit or when video is reset.
This commit is contained in:
@@ -1463,6 +1463,8 @@ void OBSBasic::OBSInit()
|
||||
|
||||
if (config_get_bool(basicConfig, "General", "OpenStatsOnStartup"))
|
||||
on_stats_triggered();
|
||||
|
||||
OBSBasicStats::InitializeValues();
|
||||
}
|
||||
|
||||
void OBSBasic::InitHotkeys()
|
||||
@@ -2772,6 +2774,8 @@ int OBSBasic::ResetVideo()
|
||||
ResizeProgram(ovi.base_width, ovi.base_height);
|
||||
}
|
||||
|
||||
OBSBasicStats::InitializeValues();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user