Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple device support #382

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f0e84da
Added support for multiple devices through -d or --device
nicola02nb Dec 4, 2024
148f449
clangd-formay fix
nicola02nb Dec 4, 2024
d11c4ba
Update output.c
nicola02nb Dec 4, 2024
0167b11
Fixed output of actions for multiple devices
nicola02nb Dec 5, 2024
c3f7cb0
Small fix
nicola02nb Dec 8, 2024
bae379c
Adding test_device to connected device list
nicola02nb Dec 8, 2024
63c8270
Improved --connected for test_device
nicola02nb Dec 8, 2024
7056ae1
Added support for -d [vendorId:productId]
nicola02nb Dec 8, 2024
e55daa3
Fixed for test
nicola02nb Dec 8, 2024
4139f14
Updated find_devices() to recognise devices only once
nicola02nb Dec 8, 2024
9681924
clangd-format-fix
nicola02nb Dec 8, 2024
54ba1c9
Moved get_two_ids() from dev.c to utility.c
nicola02nb Dec 10, 2024
855b7df
Added comment to find_devices(), moved DeviceListNode to device.h
nicola02nb Dec 10, 2024
6470bc0
Tidy up texts
Sapd Jan 14, 2025
312a42b
Improved help printing
nicola02nb Feb 2, 2025
7311574
Added showing info for all devices detected
nicola02nb Jan 22, 2025
b27acdd
Preventing get_two_ids to change values in case it gives errors
nicola02nb Jan 28, 2025
5461745
Added printing vendor and product id with OUTPUT_STANDARD
nicola02nb Jan 28, 2025
65d6751
Added terminate_device_hid function that does not clear static hid me…
nicola02nb Jan 28, 2025
512e16e
Removed -d INDEX support
nicola02nb Feb 3, 2025
819a9e6
Improved memory freeing
nicola02nb Feb 3, 2025
c92ea25
Clangd fix
nicola02nb Feb 3, 2025
cdad9e8
Update GitHub Actions to use upload-artifact@v4 (#394)
nicola02nb Feb 6, 2025
d18add1
Format
Sapd Feb 21, 2025
0722115
Fixed action running on test device when different device was selected
nicola02nb Feb 22, 2025
fc1aea5
Fixed spacing for clangd
nicola02nb Feb 22, 2025
7cbaf74
Original single device feature restored
nicola02nb Feb 22, 2025
46fc7b8
Improved main logic, added some device helper function and remove unn…
nicola02nb Feb 23, 2025
741527c
Merge branch 'Sapd:master' into multiple-device-support
nicola02nb Feb 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tidy up texts
  • Loading branch information
Sapd committed Jan 14, 2025
commit 6470bc07ccb231804eddcb484a14b7969ea29820
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ void print_help(char* programname, struct device* device_found, bool _show_all)
// printf("Options:\n");

printf("Select device:\n");
printf(" -d, --device INDEX\t\t\tSelects to which device send actions from 0 to N-1 (N = # of connected devices)\n");
printf(" -d, --device INDEX|vendorid:productid\n");
printf("\t\t\t\tSpecify either an index (0 to N-1) or a vendor ID and product ID separated by a colon.\n");
printf("\n");

if (show_all || has_capability(device_found->capabilities, CAP_SIDETONE)) {
Expand Down
4 changes: 2 additions & 2 deletions src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,9 @@ void output_standard(HeadsetControlStatus* status, HeadsetInfo* infos, bool prin
for (int i = 0; i < status->device_count; i++) {
HeadsetInfo* info = &infos[i];
if (info->product_name != NULL && wcslen(info->product_name) > 0)
printf("[%d]%s (%ls)\n", i, info->device_name, info->product_name);
printf(" [%d] %s (%ls)\n", i, info->device_name, info->product_name);
else
printf("[%d]%s\n", i, info->device_name);
printf(" [%d] %s\n", i, info->device_name);

if (print_capabilities) {
printf("\tCapabilities:\n");
Expand Down
Loading