GCAdapter: Report libusb open errors to the user

If opening the adapter fails, report the libusb error message in the GUI
instead of “No Adapter Detected”.

The error condition is removed when the adapter is unplugged.
This commit is contained in:
Vincent Duvert committed 2019-05-29 18:28:24 +02:00
1 parent 0165e5e703
commit b08e2ec959
4 files changed
+60 -24

No files matched your search

+2 -2
View File
@@ -391,9 +391,9 @@ void DolphinAnalytics::MakePerGameBuilder()
// We grab enough to tell what percentage of our users are playing with keyboard/mouse, some kind
// of gamepad
// or the official gamecube adapter.
builder.AddData("gcadapter-detected", GCAdapter::IsDetected());
builder.AddData("gcadapter-detected", GCAdapter::IsDetected(nullptr));
builder.AddData("has-controller", Pad::GetConfig()->IsControllerControlledByGamepadDevice(0) ||
GCAdapter::IsDetected());
GCAdapter::IsDetected(nullptr));
m_per_game_builder = builder;
}