bryal / captrs

Cross-platform screen capture in Rust
GNU Affero General Public License v3.0
151 stars 16 forks source link

capturer.geometry() returns (0, 0) on windows #4

Closed monoclex closed 3 years ago

monoclex commented 4 years ago

It's most likely due to these two lines

bryal commented 4 years ago

Indeed I suppose that ought to considered a bug.

A geometry method should be added to DXGIManager in the dxgcap crate. This method should retrieve the geometry of the DXGI duplicated output like is done at these lines in dxgcap/src/lib.rs. We could then use that method in the #[cfg(windows)] version of Capturer::geometry, pretty much exactly like it's done in the Linux version of Capturer::geometry.

I'm afraid I can't do something about this myself at current, as I no longer have any machines running Windows, so I wouldn't be able to actually test any implementation. If someone else wants to take a crack at this, please go ahead and submit a PR!

pballandras commented 3 years ago

Hey, I followed instructions, now I got a 1920, 1080 output on a monitor of exactly this size! Cool! Now I'll submit this in a PR.

bryal commented 3 years ago

@ItsTehStory Sorry for not replying earlier, I'll take a look right away.

bryal commented 3 years ago

Great! These changes are now up on crates.io in dxgcap version 0.2.4 and captrs version 0.3.1.