Add an option to enable performance queries in gameini files, disable it by default

This commit is contained in:
Pierre Bourdon 2013-08-11 17:08:12 +02:00
parent ffdd79df36
commit 26f58e1ba5
4 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
#include "PerfQueryBase.h"
#include "VideoConfig.h"
PerfQueryBase* g_perf_query = 0;
bool PerfQueryBase::ShouldEmulate() const
{
return g_ActiveConfig.bPerfQueriesEnable;
}

View File

@ -25,9 +25,12 @@ enum PerfQueryGroup
class PerfQueryBase
{
public:
PerfQueryBase() {};
PerfQueryBase() {}
virtual ~PerfQueryBase() {}
// Checks if performance queries are enabled in the gameini configuration.
bool ShouldEmulate() const;
// Begin querying the specified value for the following host GPU commands
virtual void EnableQuery(PerfQueryGroup type) {}

View File

@ -181,6 +181,7 @@ void VideoConfig::GameIniLoad(const char *ini_file)
iniFile.GetIfExists("Video", "PH_ZFar", &sPhackvalue[1]);
iniFile.GetIfExists("Video", "ZTPSpeedupHack", &bZTPSpeedHack);
iniFile.GetIfExists("Video", "UseBBox", &bUseBBox);
iniFile.GetIfExists("Video", "PerfQueriesEnable", &bPerfQueriesEnable);
}
void VideoConfig::VerifyValidity()

View File

@ -108,6 +108,7 @@ struct VideoConfig
// Hacks
bool bEFBAccessEnable;
bool bDlistCachingEnable;
bool bPerfQueriesEnable;
bool bEFBCopyEnable;
bool bEFBCopyCacheEnable;