Commit Graph

506 Commits

Author SHA1 Message Date
Translation Updater
3b0033a26b Update translations from Crowdin 2022-10-27 14:36:16 -07:00
derrod
a372c1c0b3 win-capture: Update D3D9 signature for Win 11 22H2 2022-10-09 16:21:02 -07:00
PatTheMav
992d18b66c win-capture: Fix reporting valid width and height if not capturing
While the inject-helper tries to hook an application, the source is
set to `active` until the inject-helper reports being unable to hook.

If the graphics thread updates the transformations of every source in
that time frame, the game-capture source will report the width and
height used from the last valid capture, leading to its selection box
flickering in and out of view.

Ensuring that width and height are only reported when the source is not
only made active but is also capturing content fixes the flickering
issue.
2022-10-09 16:17:05 -07:00
jpark37
afeb78e022 graphics-hook: Print DXGI swap chain desc 2022-09-10 15:36:53 -07:00
jpark37
5fd22f3dfd graphics-hook: Remove unused code 2022-09-10 15:36:53 -07:00
jpark37
a45cb71f6e win-capture: Remove unused wildcard code 2022-09-10 15:34:09 -07:00
jpark37
894e37d0e1 libobs-winrt,win-capture: Allow forcing SDR
We don't know if there's a way to get window color space, so we've been
using the monitor color space of the window. This toggle forces OBS to
ignore the monitor color space, and assume the window is SDR.
2022-09-04 17:16:07 -07:00
Translation Updater
cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Translation Updater
4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
wang.shaohui
7eb46d50b7 win-capture: Fix memory leak in dc-capture.c 2022-08-13 01:50:38 -07:00
Richard Stanway
3c6c44e1fe win-capture: Fix incorrect path in CMakeLists 2022-08-09 02:31:50 +02:00
Richard Stanway
86963f65d2 libobs, win-capture: Don't export ms_get_obfuscated_func
Since this was included in things like the inject helper and game
capture DLLs, it added an additional export to those programs. Instead,
simply share the source files directly in the projects that need it.

Co-authored-by: jpark37 <jpark37@users.noreply.github.com>
2022-08-07 19:41:23 +02:00
Translation Updater
81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
jpark37
00828d1d06 win-capture: Bump graphics hook version to 1.8.0 2022-07-29 23:22:39 -07:00
jpark37
f55021be90 graphics-hook: Bump Vulkan version
Vulkan loader blocks implicit layers older than application apiVersion.
2022-07-29 23:22:39 -07:00
jpark37
8a4352c1e5 graphics-hook: Relax Vulkan allocation strategy
Stop requiring DEVICE_LOCAL. May be needed for integrated GPUs.
2022-07-29 23:22:39 -07:00
jpark37
b7d630af6b graphics-hook: Update VkResult strings 2022-07-29 23:22:39 -07:00
jpark37
4c7c1854bd graphics-hook: Track DXGI status with counter
Previous approach could mark Present exit too early.
2022-07-29 21:54:28 -07:00
Eric Laberge
dfb9bb74f7 graphics-hook: Avoid conflict between Vulkan and DXGI Present 2022-07-29 21:54:07 -07:00
jpark37
69ff026647 libobs, win-capture: Share window helper code
Add "ms_" prefix as makeshift namespace.
2022-07-23 17:41:34 -07:00
Norihiro Kamae
7e3656ab33 plugins: Cleanup unused-parameters
- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
2022-07-19 11:01:00 -04:00
PatTheMav
9145e3063d win-capture: Fix subprojects not installing on incremental builds
When changing a subproject (e.g. graphics-hook), the generated binaries
are not installed without also building win-capture. This commit enables
the subprojects to be treated as "plugins" which are installed to rundir
and also the installation directory without any additional workarounds.
2022-07-13 15:52:13 -04:00
jpark37
df96e68ca6 cmake: Disable LNK4099 warning
We are very unlikely to ship PDBs for deps.
2022-07-11 22:07:10 -07:00
jpark37
235e025570 win-capture: Rename Rec. 2020 to Rec. 2100 2022-05-27 04:38:02 -07:00
Norihiro Kamae
34e570c5bc Fix indent on multiline comments 2022-04-30 16:06:23 -07:00
jpark37
93fe82d1ce win-capture: Add DXGI/WGC HDR support
HDR for DXGI/WGC display capture, and WGC window capture.

Also add fast SDR paths for BitBlt to skip color conversions.
2022-04-14 09:36:09 -07:00
jpark37
d35e7d3107 win-capture: Add HDR support to Game Capture 2022-04-13 06:23:11 -07:00
jpark37
d641ab12f7 win-capture: Use normal blend equation for cursor
Not sure what the previous setup was trying to do. I guess we'll find
out if users complain.
2022-04-07 01:51:15 -07:00
PatTheMav
d42c98fa22 win-capture: Fix added resources not properly copied to rundir
The `add_target_resource` function uses unnecessary path components
when copying files to the rundir, resulting in files added that way
not to end up where OBS expects them to.

The generated binaries created by sub-targets also need to be copied
as part of `win-capture`'s data files, which was easy to fix as the
target exists before CMake switches into the subdirectories.
2022-03-30 11:10:54 +02:00
PatTheMav
49e9d49943 plugins: Update CMakeLists.txt for included plugins 2022-03-16 23:11:08 +01:00
Translation Updater
ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
jpark37
63a6534966 win-capture: Fix parameter mismatches
Fix missing HWND argument type, and use DWORD based on MS sample.
2022-01-23 20:39:54 +11:00
Matt Gajownik
fa35fd0f55 win-capture: Don't list minimized UWP apps 2022-01-18 03:42:27 -08:00
Richard Stanway
d458780f02 win-capture: Use stack buffer for small window titles
Avoids expensive malloc calls that might also contribute to excessive
heap fragmentation.
2022-01-18 01:58:45 +01:00
Richard Stanway
ecf8c1239d win-capture: Make open_process_proc static
Seems like the original intention and avoids repeatedly calling
GetProcAddress. Detected by PVS Studio.
2022-01-18 00:00:10 +01:00
wangshaohui
81d70b5d1b win-capture: Should not init module if HWND is invisible 2021-12-16 23:39:55 -08:00
Translation Updater
261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
jpark37
2fa145899f inject-helper: Remove UNUSED_PARAMETER macro
Potential definition clash with c99defs.h. Not needed anyway.
2021-11-20 22:53:10 -08:00
jpark37
6a288b255a win-capture: Use DPI context for game capture
Fixes cursor position for windows unaware of DPI.

Only works on Windows 10 1607 and above.
2021-10-09 15:45:55 -07:00
jpark37
3706a21327 win-capture: Use DPI context for window BitBlt
Fixes GetClientRect and cursor position for windows unaware of DPI.

Only works on Windows 10 1607 and above.
2021-10-09 15:45:55 -07:00
jp9000
9deb8fe292 win-capture: Update graphics hook version to 1.7.1
Makes sure that OBS updates its graphics hook version
2021-09-28 10:08:55 -07:00
Vainock
11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
jpark37
40cea9ca50 win-capture: Remove dependency on psapi.lib 2021-09-12 14:10:36 -07:00
jpark37
c5e7a6f23b win-capture: Clear stale pointers for game capture
Fixes shmem crashes when using Alt+Tab.
2021-08-27 22:46:17 -07:00
Jim
84bf08c171 Merge pull request #4720 from jpark37/detours-integration
Finish Detours integration for remaining game capture APIs
2021-08-23 23:18:10 -07:00
kokole
dd6dd4e104 win-capture: Fix D3D12 third party overlay capture
Doesn't make sense to grab the oldest frame when not capturing overlays,
because the overlay was already rendered in it. This will grab the
latest frame (before the overlay is rendered).
2021-08-17 08:24:57 -07:00
jpark37
0f2c1447ab graphics-hook: Fix D3D11On12 usages
Use D3D12_RESOURCE_STATE_PRESENT for CreateWrappedResource arguments. We
should assume the application will set the backbuffer to PRESENT, and
expect that to be preserved across the Present() call.

Remove unnecessary calls to ReleaseWrappedResources.

Clean up (void**) casts with modern patterns.
2021-08-15 15:58:09 -07:00
Richard Stanway
ff0350b515 win-capture: Fix formatting 2021-07-24 23:21:02 +02:00
Richard Stanway
320177926d win-capture: Use better defaults in thread_is_suspended
On my system with ~250 processes running, this loop has to run over 500
times before allocating enough memory. Use better initial and increment
values to avoid thrashing the heap.
2021-07-24 23:15:45 +02:00
Richard Stanway
b2e30c955d win-capture: Move NT functions to shared file
Having them declared statically in a header included by multiple
compilation units results in duplicate functions being created.
2021-07-24 23:15:45 +02:00