-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed to capture windows - DeleteObject HBITMAP(0x5d050727) failed - Process not DPI aware #194
Closed
louis030195 opened this issue
Feb 17, 2025
· 6 comments
· Fixed by mediar-ai/screenpipe#1411 or #195
Closed
failed to capture windows - DeleteObject HBITMAP(0x5d050727) failed - Process not DPI aware #194
louis030195 opened this issue
Feb 17, 2025
· 6 comments
· Fixed by mediar-ai/screenpipe#1411 or #195
Comments
Couldn't replicate the problem. |
![]() this is new, did not have until we moved from xcap = "0.0.12" to xcap = { package = "xcap", git = "https://github.com/nashaofu/xcap", rev = "214cb44" } i use windows through https://parsec.app/ |
I changed screenpipe-vision/Cargo.toml to xcap = "0.2.2" and the |
请问这里的 if DeleteObject(val.into()).as_bool() {
log::error!("DeleteObject {:?} failed", val);
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
some of my users get this error
xcap/src/windows/capture.rs
Line 91 in 66feae0
Process not DPI aware
claude says:
Let me help analyze this Windows GDI code and the DPI awareness issue. Let's think through this:
Here's how we can fix this:
The changes:
ceil()
toround()
for more accurate scaling calculationsYou'll need to call
init_dpi_awareness()
early in your application startup, before any window or screen capture operations. This ensures Windows knows how to handle DPI scaling for your application.The error you're seeing ("Process not DPI aware") indicates that Windows is trying to handle DPI scaling automatically, which can cause issues with GDI operations. By making the process DPI aware, we tell Windows that we'll handle the scaling ourselves.
The text was updated successfully, but these errors were encountered: