In this build I try to resize the form to the full screen size and resetting the D3D device as well when the resolution changed because an display was removed/added.
Going to the tray and back caused too much timing issues on the various systems as Windows was not ready even when it said so (resulting in a black screen and you need to minimize/maximize MP once again) because of HDMI handshake handling in the HDMI chain of various setups.
Therefore I am trying a different approach now. Please let me know how this works.
Notes for testing Bulild #5:
check if the form is still not in fullscreen and what resolution it might be (half fullscreen was 1024*768 for everyone in this thread so far.)
any other issue not listed under the known issues
double device resets in case your system reports multiple display changes in a row. Check log for WM_DISPLAYCHANGE messages.
Very quick on/off toggle of the display in a row if it works in general. Just a stress test for display change handling.
Full RDP/VNC/Teamviewer testing also needed
AsRock InstantBoot test
Suspend/Hibernation and Resume tests. I expect an unrecoverable lost D3D device and want to make sure it happens everywhere. During a power state toggle I have to deal with lost D3D devices in addition to WM_DISPLAYCHANGE. Managed DirectX in combination with C# disposes the D3D object on the garbage collection even though it shouldn't.
Again, thanks for helping out as I cannot reproduce this on demand because of my 100% HDMI hot plug/ACPI compliant equipment.
The problem is 100% identified. It is just a matter of finding a solution that works for all setups. We'll get there and find the best way for handling WM_DISPLAYCHANGE. All logs showed proper display change events, so everything needs to be triggered from there.
This is what I think you want in the test programm:
A Normal on/off toggle.
B Very quick on/off toggle of the display in a row
C Full RDP/VNC/Teamviewer testing also needed <<< How?? details so I do the right thing for you.
D AsRock InstantBoot test ( Dont have an ASrock board)
E Suspend/Hibernation and Resume tests.
F Changing Themes or Skins in MP
G Minimizing to tray during playback
Test A: Normal on/off toggle.
Direct3D device lost after second time off/on
Test B: Very quick on/of toggle.
Direct3D device lost after a number (5+) of times.
Test E: Suspend 3 times
No error. Good behaviour.
Test E: Hybernate 2 times
After the second time, MP froze. Clicking tray icon didnt work. I was able to bring up the GUI, but it was froozen. Forced to end mediaportal.exe in processes through taskmanager
Test F: Switch skin
No error. Switched a number of times between Titan and defaultwide. No issue seen.
Test G: switch off/on during playback.
After first off/on playback stopped and was back in GUI.
After second off/on MP threw the Direct3D device lost up again.
NEW ISSUE
I just noticed.
upon pressing play on a video file, MP sometimes minimizes. I need to press START on the remote to get MP playback in full screen.
Upon pressing STOP, MP minizes again.
Keep in mind I put your files directly over a recent GIT build. So it might be a result of that... dont know.
I had a quick look and it looked good for switching on/off TV/Receiver while connected with Teamviewer. It looked good for sleeping and resuming as well as long as tv/receiver where left powered on.
Later when resuming and powering on the other devices at the same time (via harmony remote ) I had similar errors as edterbak with direct3d.
I would go for some deeper testing and producing full sets of logs/screens but I'm running Win 8 and Argus here. So I don't know if you want that kind of testing with non standard setups at this point? I could spare some time tomorrow. If not I will come back when you need me to....