Restore display settings.
Only restore by the display registry settings.
Do not change display settings twice when turning off privacy mode.
Only restore the registry values.
Signed-off-by: fufesou <linlong1266@gmail.com>
1. Windows, multi-display, as the controlled side.
2. Connect
3. Turn on privacy mode, with mode 2.
4. Turn off privacy mode.
Then the display settings are continues changed when connect &
disconnect.
Signed-off-by: fufesou <linlong1266@gmail.com>
How to reproduce: elevate at primary display->switch to another
display->
trigger UAC->switch to primary display->can't see UAC
Signed-off-by: 21pages <sunboeasy@gmail.com>
* Calculate fps without distinguish displays, use one fps control
because the controlled side control fps of all displays with one FPS
variable.
* Because all displays decode frame in one thread, when there are N
displays, the video frames received in one second is `fps * N`, so the
calculated decode fps should be divided by N. Because the actual
display count is not obvious in rust, when no data frame is received for 5 seconds, the display is considered inactive, and only the active display is used as the dividend.
Signed-off-by: 21pages <sunboeasy@gmail.com>