1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Added StatsAggregateTime setting

This commit is contained in:
narzoul 2023-07-02 18:32:27 +02:00
parent 29665e9238
commit 320828c4a3
5 changed files with 28 additions and 1 deletions

View File

@ -29,6 +29,7 @@
#include <Config/Settings/SpriteDetection.h>
#include <Config/Settings/SpriteFilter.h>
#include <Config/Settings/SpriteTexCoord.h>
#include <Config/Settings/StatsAggregateTime.h>
#include <Config/Settings/StatsColumns.h>
#include <Config/Settings/StatsHotKey.h>
#include <Config/Settings/StatsRows.h>
@ -76,6 +77,7 @@ namespace Config
Settings::SpriteDetection spriteDetection;
Settings::SpriteFilter spriteFilter;
Settings::SpriteTexCoord spriteTexCoord;
Settings::StatsAggregateTime statsAggregateTime;
Settings::StatsColumns statsColumns;
Settings::StatsHotKey statsHotKey;
Settings::StatsRows statsRows;

View File

@ -0,0 +1,20 @@
#pragma once
#include <Config/IntSetting.h>
namespace Config
{
namespace Settings
{
class StatsAggregateTime : public IntSetting
{
public:
StatsAggregateTime()
: IntSetting("StatsAggregateTime", "3", 1, 60)
{
}
};
}
extern Settings::StatsAggregateTime statsAggregateTime;
}

View File

@ -194,6 +194,7 @@
<ClInclude Include="Config\Settings\SpriteDetection.h" />
<ClInclude Include="Config\Settings\SpriteFilter.h" />
<ClInclude Include="Config\Settings\SpriteTexCoord.h" />
<ClInclude Include="Config\Settings\StatsAggregateTime.h" />
<ClInclude Include="Config\Settings\StatsColumns.h" />
<ClInclude Include="Config\Settings\StatsHotKey.h" />
<ClInclude Include="Config\Settings\StatsRows.h" />

View File

@ -684,6 +684,9 @@
<ClInclude Include="Config\Settings\StatsUpdateRate.h">
<Filter>Header Files\Config\Settings</Filter>
</ClInclude>
<ClInclude Include="Config\Settings\StatsAggregateTime.h">
<Filter>Header Files\Config\Settings</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Gdi\Gdi.cpp">

View File

@ -1,3 +1,4 @@
#include <Config/Settings/StatsAggregateTime.h>
#include <Config/Settings/StatsUpdateRate.h>
#include <Overlay/StatsQueue.h>
@ -17,7 +18,7 @@ namespace
StatsQueueInitializer::StatsQueueInitializer()
{
s_update_rate = Config::statsUpdateRate.get();
s_history_time = 3;
s_history_time = Config::statsAggregateTime.get();
s_history_size = s_history_time * s_update_rate;
}