Analytics: add simple framework for game quirks reporting
And use it for reporting games that rely on ICache emulation to some degree. We know of a few but it would be interesting to get a more exhaustive list from crowdsourcing.
This commit is contained in:
1 parent
97e3200f57
commit
ef562ec2f1
3 files changed
+49
No files matched your search
@@ -131,9 +131,34 @@ void DolphinAnalytics::ReportGameStart()
|
||||
builder.AddData("type", "game-start");
|
||||
Send(builder);
|
||||
|
||||
// Reset per-game state.
|
||||
m_reported_quirks.fill(false);
|
||||
InitializePerformanceSampling();
|
||||
}
|
||||
|
||||
// Keep in sync with enum class GameQuirk definition.
|
||||
const char* GAME_QUIRKS_NAMES[] = {
|
||||
"icache-matters", // ICACHE_MATTERS
|
||||
};
|
||||
static_assert(sizeof(GAME_QUIRKS_NAMES) / sizeof(GAME_QUIRKS_NAMES[0]) ==
|
||||
static_cast<u32>(GameQuirk::COUNT),
|
||||
"Game quirks names and enum definition are out of sync.");
|
||||
|
||||
void DolphinAnalytics::ReportGameQuirk(GameQuirk quirk)
|
||||
{
|
||||
u32 quirk_idx = static_cast<u32>(quirk);
|
||||
|
||||
// Only report once per run.
|
||||
if (m_reported_quirks[quirk_idx])
|
||||
return;
|
||||
m_reported_quirks[quirk_idx] = true;
|
||||
|
||||
Common::AnalyticsReportBuilder builder(m_per_game_builder);
|
||||
builder.AddData("type", "quirk");
|
||||
builder.AddData("quirk", GAME_QUIRKS_NAMES[quirk_idx]);
|
||||
Send(builder);
|
||||
}
|
||||
|
||||
void DolphinAnalytics::ReportPerformanceInfo(PerformanceSample&& sample)
|
||||
{
|
||||
if (ShouldStartPerformanceSampling())
|
||||
|
||||
Reference in new issue
Block a user