From 739f17419931ca5d03555968344e4a2e83cb0af1 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Mon, 30 Jul 2018 21:32:53 +0200 Subject: [PATCH] hdmi cec --- raspberry-environment/display.py | 4 ++++ windows-snapshot-tool/src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/raspberry-environment/display.py b/raspberry-environment/display.py index c159eb5..fc5a365 100644 --- a/raspberry-environment/display.py +++ b/raspberry-environment/display.py @@ -215,6 +215,10 @@ if __name__ == '__main__': #os_echo(g+"functions/rndis.usb0/os_desc/interface.rndis/compatible_id", "RNDIS") #os_echo(g+"functions/rndis.usb0/os_desc/interface.rndis/sub_compatible_id", "5162001") + # send hdmi-cec commands: turn on tv, make this active source + subprocess.run('echo "on 0" | cec-client RPI -s -d 1', shell=True, check=False) + subprocess.run('echo "as" | cec-client RPI -s -d 1', shell=True, check=False) + fallback_str = b'state 0x12000a [HDMI DMT (4) RGB full 4:3], 640x480 @ 60.00Hz, progressive\n' p = subprocess.Popen(['tvservice', '-s'], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) _stdout, _stderr = p.communicate() diff --git a/windows-snapshot-tool/src/main.cpp b/windows-snapshot-tool/src/main.cpp index 92ec8b8..14870dc 100644 --- a/windows-snapshot-tool/src/main.cpp +++ b/windows-snapshot-tool/src/main.cpp @@ -34,7 +34,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance, int nCmdShow) { // SetProcessDPIAware(); -// SetProcessDPIAwareness(); +// SetProcessDPIAwareness(PROCESS_PER_MONITOR_DPI_AWARE); // kill other already running instances HWND existingApp = FindWindow(0, szClassName);