fix: use monitor.vcp.set_vcp_feature (monitorcontrol v4 API), fix monitor indices 1+2

This commit is contained in:
Miłosz Matysiak
2026-04-09 10:25:21 +02:00
parent 05a96e29e4
commit 5dcdfa5221
4 changed files with 31 additions and 17 deletions

View File

@@ -10,8 +10,9 @@ print("Skanowanie monitorow (VCP code 0x60 - Input Source)...")
for i, handle in enumerate(get_monitors()):
with handle as monitor:
try:
current = monitor.get_vcp_feature(VCP_INPUT_SOURCE)
print(f" Monitor {i}: VCP input = {current.value} (0x{current.value:02X})")
current = monitor.vcp.get_vcp_feature(VCP_INPUT_SOURCE)
val = current[0]
print(f" Monitor {i}: VCP input = {val} (0x{val:02X})")
except Exception as e:
print(f" Monitor {i}: blad odczytu - {e}")
print()