Merge pull request #3911 from phire/analytics_controller_info

analytics: Collect controller information.
This commit is contained in:
Chris Burgener 2016-06-20 09:57:44 -04:00 committed by GitHub
commit 879f3bf0d9
1 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,10 @@
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Movie.h" #include "Core/Movie.h"
#include "Core/NetPlayProto.h" #include "Core/NetPlayProto.h"
#include "Core/HW/GCPad.h"
#include "InputCommon/ControllerEmu.h"
#include "InputCommon/GCAdapter.h"
#include "InputCommon/InputConfig.h"
#include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"
@ -242,5 +246,13 @@ void DolphinAnalytics::MakePerGameBuilder()
builder.AddData("netplay", NetPlay::IsNetPlayRunning()); builder.AddData("netplay", NetPlay::IsNetPlayRunning());
builder.AddData("movie", Movie::IsMovieActive()); builder.AddData("movie", Movie::IsMovieActive());
// Controller information
builder.AddData("gcadapter-detected", GCAdapter::IsDetected());
// For privacy reasons, limit this to type of the first controller.
// The ControllersNeedToBeCreated() check is enough to ensure GetController(0) won't return nullptr or throw exceptions.
if (!Pad::GetConfig()->ControllersNeedToBeCreated())
builder.AddData("controller-type", Pad::GetConfig()->GetController(0)->default_device.name);
m_per_game_builder = builder; m_per_game_builder = builder;
} }