debug virtual display with dummy one
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
42e8971793
commit
205798b611
@ -639,6 +639,10 @@ impl Connection {
|
||||
if active_conns_lock.is_empty() {
|
||||
video_service::reset_resolutions();
|
||||
}
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
if active_conns_lock.is_empty() {
|
||||
video_service::try_plug_out_virtual_display();
|
||||
}
|
||||
log::info!("#{} connection loop exited", id);
|
||||
}
|
||||
|
||||
|
@ -495,11 +495,14 @@ fn check_get_displays_changed_msg() -> Option<Message> {
|
||||
Some(msg_out)
|
||||
}
|
||||
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
pub fn try_plug_out_virtual_display() {
|
||||
let _res = virtual_display_manager::plug_out_headless();
|
||||
}
|
||||
|
||||
fn run(sp: GenericService) -> ResultType<()> {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
let _wake_lock = get_wake_lock();
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
let _res = virtual_display_manager::plug_out_headless();
|
||||
|
||||
// ensure_inited() is needed because release_resource() may be called.
|
||||
#[cfg(target_os = "linux")]
|
||||
@ -1015,10 +1018,6 @@ fn try_get_displays() -> ResultType<Vec<Display>> {
|
||||
} else {
|
||||
displays = Display::all()?;
|
||||
}
|
||||
} else {
|
||||
if virtual_display_manager::plug_out_headless() {
|
||||
displays = Display::all()?;
|
||||
}
|
||||
}
|
||||
Ok(displays)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user