Skip to content

Commit

Permalink
Merge pull request #11317 from ronso0/hid-dev
Browse files Browse the repository at this point in the history
controllers: show HID devices in developer mode
  • Loading branch information
daschuer authored Mar 1, 2023
2 parents b2a8e11 + 4d2cdd6 commit ea329f9
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 ea329f9

Please sign in to comment.