2009-01-11, 17:18
moby-uk Wrote:Wiso is correct, and as this is totally unsupported by the XBMC developers asking them to change features in the base program is probably unreasonable.
Wiso: there is already a "LockSetForegroundWindow(LSFW_UNLOCK)" in ExternalPlayer before the external player is launched but it doesn't seem to help when XBMC is fullscreen; maybe a timing issue as immediately afterwards there's a call to g_graphicsContext.Lock() ...
I've implemented a workaround in my local build with changes localized to ExternalPlayer.cpp. basically I hide the XBMC window before the external player is launched and then restore it afterwards, I also needed to delay the call to g_graphicsContext.Lock() slightly.
Win32 GUI programming is not really my thing but this worksforme; you _may_ get a bit of a flicker but it's better than the external player being hidden.
I've also fixed in ExternalPlayer.cpp:
The first argument to the external process wasn't quoted so if the executable was C:\Program Files\Windows Media Player\wmplayer.exe then the arguments would be
0: C:\Program
1: Files\Windows
2: Media
3: Player\wmplayer.exe
followed by the args from advanced setting followed by the file path. That certainly confused WMP on my machine and it would not play the video.
thanks for the digging ! mind sharing the diff ? (just PM me) or dump it in a new trac ticket