mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-21 12:11:06 +03:00
fix: workaround physical display rotation (#9696)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -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