mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
feat, win10, virtual display, not support message
Signed-off-by: fufesou <shuanglongchen@yeah.ne>
This commit is contained in:
@@ -2371,14 +2371,19 @@ impl Connection {
|
||||
};
|
||||
|
||||
if t.on {
|
||||
if let Err(e) = virtual_display_manager::plug_in_index_modes(t.display as _, Vec::new())
|
||||
{
|
||||
log::error!("Failed to plug in virtual display: {}", e);
|
||||
self.send(make_msg(format!(
|
||||
"Failed to plug in virtual display: {}",
|
||||
e
|
||||
)))
|
||||
.await;
|
||||
if !virtual_display_manager::is_virtual_display_supported() {
|
||||
self.send(make_msg("idd_not_support_tip".to_string())).await;
|
||||
} else {
|
||||
if let Err(e) =
|
||||
virtual_display_manager::plug_in_index_modes(t.display as _, Vec::new())
|
||||
{
|
||||
log::error!("Failed to plug in virtual display: {}", e);
|
||||
self.send(make_msg(format!(
|
||||
"Failed to plug in virtual display: {}",
|
||||
e
|
||||
)))
|
||||
.await;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let indices = if t.display == -1 {
|
||||
|
||||
@@ -348,7 +348,10 @@ pub fn try_get_displays() -> ResultType<Vec<Display>> {
|
||||
#[cfg(all(windows, feature = "virtual_display_driver"))]
|
||||
pub fn try_get_displays() -> ResultType<Vec<Display>> {
|
||||
let mut displays = Display::all()?;
|
||||
if crate::platform::is_installed() && no_displays(&displays) {
|
||||
if crate::platform::is_installed()
|
||||
&& no_displays(&displays)
|
||||
&& virtual_display_manager::is_virtual_display_supported()
|
||||
{
|
||||
log::debug!("no displays, create virtual display");
|
||||
if let Err(e) = virtual_display_manager::plug_in_headless() {
|
||||
log::error!("plug in headless failed {}", e);
|
||||
|
||||
Reference in New Issue
Block a user