ayumax / WindowCapture2D

Library for capturing and displaying windows in real time with UnrealEngine
MIT License
66 stars 23 forks source link

captured window has wrong size in paked version #6

Open edstoica opened 3 years ago

edstoica commented 3 years ago

hello,

the plugin is working perfectly for us in editor mode.

however, in shipping mode, the captured window is "cropped" and only a part of it is visible. on the right and bottom, there are big black bars.

is this a known issue? should I post more information on the issue?

Engine Version is 4.23.1

thank you in advance, ed

btw: we offer a donation on that issue.

edstoica commented 3 years ago

Ok, I see that the issue is caused by the "Ms Windows Screen Resolution Factor". When I set it to 100%, everything is fine.

Is there any way to fix this?


HINT: there is another capture plugin on the marketplace, (but only version 4.24+) I read in the comments, that they had the same issue, but they solved it somehow. (since i am no c++ hero, its difficult to find the code where this "res factor" is checked. But maybe it helps you)

the Plugin is called: "screen capture media source" in the "questions" there is a user "everyGoodWork" who has that isse i am talking about.

By EveryGoodWork on December 5, 2020 5:57 PM

The plugin works as expected when I play in editor, however when I run as standalone game the window is clipped to a smaller area of the screen for an unknown reason.

Example:
https://1drv.ms/u/s!AqMjFGC-IEx2dqDPs7m5M59ILBo?e=NeIy1C

Best Answer from Publisher
  By crevetor on December 6, 2020 1:53 AM - Edited on December 20, 2020 6:40 PM
In the interest of spreading the knowledge, we found out that this issue was due to having a screen with a scale that is more than 100%. I plan on fixing this issue in a future release.

Update 2020-12-20 : this bug is now fixed.
edstoica commented 3 years ago

seem like this depends on windows system resolution scale factor. when i set my monitors to 100%, all is ok. but other values lead to wrong window capture.

i found this information about high dpi scaling: https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows

for a packed game, it is also possible to right click the .exe file and select properties->compability->high dpi settings. hook on both checkboxes. this disables the ms-windows-dpi scale for your packed game. the plugin window capture works now correctly and independent from the users desktop-dpi-scale.