mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-02-17 14:07:28 +08:00
rotate ID3D11Texture2D (#9772)
* Rotate ID3D11Texture2D after duplication with d3d11 video processor. * If display is not rotated, nothing will be created; If the rotation fails, it will use the old fallback logic TODO: * If changing from Landscape to Landscape(flipped) during capture, the resolution is not changed, video service fallback to gdi directly. Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -3838,6 +3838,12 @@ mod raii {
|
||||
let mut lock = SESSIONS.lock().unwrap();
|
||||
let contains = lock.contains_key(&key);
|
||||
if contains {
|
||||
// No two remote connections with the same session key, just for ensure.
|
||||
let is_remote = AUTHED_CONNS
|
||||
.lock()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|c| c.0 == conn_id && c.1 == AuthConnType::Remote);
|
||||
// If there are 2 connections with the same peer_id and session_id, a remote connection and a file transfer or port forward connection,
|
||||
// If any of the connections is closed allowing retry, this will not be called;
|
||||
// If the file transfer/port forward connection is closed with no retry, the session should be kept for remote control menu action;
|
||||
@@ -3847,7 +3853,7 @@ mod raii {
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|c| c.0 != conn_id && c.2 == key && c.1 == AuthConnType::Remote);
|
||||
if !another_remote {
|
||||
if is_remote || !another_remote {
|
||||
lock.remove(&key);
|
||||
log::info!("remove session");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user