mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-06 08:40:12 +00:00
fix: workaround physical display rotation (#9696)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
1 parent
675ffe0381
commit
8c8a643cce
3 files changed
+21
-6
No files matched your search
@@ -253,7 +253,17 @@ impl Capturer {
|
||||
|
||||
pub fn frame<'a>(&'a mut self, timeout: UINT) -> io::Result<Frame<'a>> {
|
||||
if self.output_texture {
|
||||
Ok(Frame::Texture(self.get_texture(timeout)?))
|
||||
let rotation = match self.display.rotation() {
|
||||
DXGI_MODE_ROTATION_IDENTITY | DXGI_MODE_ROTATION_UNSPECIFIED => 0,
|
||||
DXGI_MODE_ROTATION_ROTATE90 => 90,
|
||||
DXGI_MODE_ROTATION_ROTATE180 => 180,
|
||||
DXGI_MODE_ROTATION_ROTATE270 => 270,
|
||||
_ => {
|
||||
// Unsupported rotation, try anyway
|
||||
0
|
||||
}
|
||||
};
|
||||
Ok(Frame::Texture((self.get_texture(timeout)?, rotation)))
|
||||
} else {
|
||||
let width = self.width;
|
||||
let height = self.height;
|
||||
|
||||
Reference in new issue
Block a user