문제

Very simple, I want to simply run XBMC when I push the switch on my switcher to switch from my PC display to the TV above it. I'm not too fussy on the language but was more curious if there was an event I could subscribe to do this (in the Win32 API, maybe). If not, how might I go about polling for this?

도움이 되었습니까?

해결책

The SC_MONITORPOWER might help you, you could have a look here http://thydzik.com/hdmion-a-solution-to-loss-of-dvi-video-epid-signal-on-hd-tvs/ to start.

For me, whenever I changed the display input on HDMI, my DVI output would go dead, presumably because it detected the monitor having gone (since now it was using a different HDMI input).

If your setup is similar.. DVI->HDMI with a TV that runs similarly, this might work. I. e. detecting (maybe polling?) whether a monitor is attached to that output at all. But it depends a lot on how recent the hardware is you are running.. it probably will not work in a generic case.

Note that the sample I posted is not detecting whether a monitor is there, it simply forces a re-detection. Detection might work similar, though.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top