Add an option to enable performance queries in gameini files, disable it by default
This commit is contained in:
parent
ffdd79df36
commit
26f58e1ba5
|
@ -1,3 +1,9 @@
|
||||||
#include "PerfQueryBase.h"
|
#include "PerfQueryBase.h"
|
||||||
|
#include "VideoConfig.h"
|
||||||
|
|
||||||
PerfQueryBase* g_perf_query = 0;
|
PerfQueryBase* g_perf_query = 0;
|
||||||
|
|
||||||
|
bool PerfQueryBase::ShouldEmulate() const
|
||||||
|
{
|
||||||
|
return g_ActiveConfig.bPerfQueriesEnable;
|
||||||
|
}
|
||||||
|
|
|
@ -25,9 +25,12 @@ enum PerfQueryGroup
|
||||||
class PerfQueryBase
|
class PerfQueryBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PerfQueryBase() {};
|
PerfQueryBase() {}
|
||||||
virtual ~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
|
// Begin querying the specified value for the following host GPU commands
|
||||||
virtual void EnableQuery(PerfQueryGroup type) {}
|
virtual void EnableQuery(PerfQueryGroup type) {}
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ void VideoConfig::GameIniLoad(const char *ini_file)
|
||||||
iniFile.GetIfExists("Video", "PH_ZFar", &sPhackvalue[1]);
|
iniFile.GetIfExists("Video", "PH_ZFar", &sPhackvalue[1]);
|
||||||
iniFile.GetIfExists("Video", "ZTPSpeedupHack", &bZTPSpeedHack);
|
iniFile.GetIfExists("Video", "ZTPSpeedupHack", &bZTPSpeedHack);
|
||||||
iniFile.GetIfExists("Video", "UseBBox", &bUseBBox);
|
iniFile.GetIfExists("Video", "UseBBox", &bUseBBox);
|
||||||
|
iniFile.GetIfExists("Video", "PerfQueriesEnable", &bPerfQueriesEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoConfig::VerifyValidity()
|
void VideoConfig::VerifyValidity()
|
||||||
|
|
|
@ -108,6 +108,7 @@ struct VideoConfig
|
||||||
// Hacks
|
// Hacks
|
||||||
bool bEFBAccessEnable;
|
bool bEFBAccessEnable;
|
||||||
bool bDlistCachingEnable;
|
bool bDlistCachingEnable;
|
||||||
|
bool bPerfQueriesEnable;
|
||||||
|
|
||||||
bool bEFBCopyEnable;
|
bool bEFBCopyEnable;
|
||||||
bool bEFBCopyCacheEnable;
|
bool bEFBCopyCacheEnable;
|
||||||
|
|
Loading…
Reference in New Issue