Skip to content

Commit

Permalink
controllers: show HID devices in developer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Feb 28, 2023
1 parent b2a8e11 commit 4d2cdd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/hid/hidenumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
#include "controllers/hid/hidcontroller.h"
#include "controllers/hid/hiddenylist.h"
#include "controllers/hid/hiddevice.h"
#include "util/cmdlineargs.h"

namespace {

bool recognizeDevice(const hid_device_info& device_info) {
// Skip mice and keyboards. Users can accidentally disable their mouse
// and/or keyboard by enabling them as HID controllers in Mixxx.
// https://bugs.launchpad.net/mixxx/+bug/1940599
if (device_info.usage_page == mixxx::hid::kGenericDesktopUsagePage &&
if (!CmdlineArgs::Instance().getDeveloper() &&
device_info.usage_page == mixxx::hid::kGenericDesktopUsagePage &&
(device_info.usage == mixxx::hid::kGenericDesktopMouseUsage ||
device_info.usage == mixxx::hid::kGenericDesktopKeyboardUsage)) {
return false;
Expand Down

0 comments on commit 4d2cdd6

Please sign in to comment.