mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 10:00:46 +00:00
remove asio devices from hardware out context menus
if not A1 removes `-remove device selection-` from hardware out A1 context menu patch bump fixes #7
This commit is contained in:
parent
5069db97da
commit
7648b68b85
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "nvda_voicemeeter"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
description = "A Voicemeeter app compatible with NVDA"
|
||||
authors = [
|
||||
{ name = "onyx-and-iris", email = "code@onyxandiris.online" },
|
||||
|
@ -102,8 +102,6 @@ class Builder:
|
||||
"""tab0 row1 represents hardware outs"""
|
||||
|
||||
def add_physical_device_opts(layout):
|
||||
devices = get_output_device_list(self.vm)
|
||||
devices.append("- remove device selection -")
|
||||
if self.kind.name == "basic":
|
||||
num_outs = self.kind.phys_out + self.kind.virt_out
|
||||
else:
|
||||
@ -113,7 +111,7 @@ class Builder:
|
||||
psg.ButtonMenu(
|
||||
f"A{i + 1}",
|
||||
size=(6, 3),
|
||||
menu_def=["", devices],
|
||||
menu_def=["", get_output_device_list(i, self.vm)],
|
||||
key=f"HARDWARE OUT||A{i + 1}",
|
||||
)
|
||||
for i in range(num_outs)
|
||||
|
@ -17,8 +17,12 @@ def get_input_device_list(vm) -> list:
|
||||
return ["{type}: {name}".format(**vm.device.input(i)) for i in range(vm.device.ins)]
|
||||
|
||||
|
||||
def get_output_device_list(vm) -> list:
|
||||
return ["{type}: {name}".format(**vm.device.output(i)) for i in range(vm.device.outs)]
|
||||
def get_output_device_list(i, vm) -> list:
|
||||
devices = ["{type}: {name}".format(**vm.device.output(j)) for j in range(vm.device.outs)]
|
||||
if i == 0:
|
||||
return devices
|
||||
devices.append("- remove device selection -")
|
||||
return [device for device in devices if not device.startswith("asio")]
|
||||
|
||||
|
||||
def get_patch_composite_list(kind) -> list:
|
||||
|
Loading…
Reference in New Issue
Block a user