Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top