04-11-2025, 02:24 PM
It seems that when the window is set to full screen and when the primary monitor is changed, then on Windows 11 the SizeChanged event is called before the Microsoft.Win32.SystemEvents.DisplaySettingsChanging event. Because of this the DXEngine resized the existing D3DImage objects but the backend adapter was not valid anymore - this lead to a crash.
I have updated the code to check if the current adapter is still valid when the SizeChanged event occurs. If it is not valid anymore, then the D3DImage is not resized but it waits for the Microsoft.Win32.SystemEvents.DisplaySettingsChanging and Microsoft.Win32.SystemEvents.DisplaySettingsChanged events to be recreated.
I have sent the fix to the ohmyizzy who reported this issue. Hopefully, he will also report that this is solved.
I have updated the code to check if the current adapter is still valid when the SizeChanged event occurs. If it is not valid anymore, then the D3DImage is not resized but it waits for the Microsoft.Win32.SystemEvents.DisplaySettingsChanging and Microsoft.Win32.SystemEvents.DisplaySettingsChanged events to be recreated.
I have sent the fix to the ohmyizzy who reported this issue. Hopefully, he will also report that this is solved.
Andrej Benedik