620 Commits
Author SHA1 Message Date
PabloandRyan Foster bcd53e2914 win-capture: Add Construct 3 window class to WGC match
Construct 3 games register a top-level window class named
"WindowsWebview2Wrapper" which does not contain "Chrome" or "Mozilla",
causing OBS automatic mode to use BitBlt instead of WGC, which results
in a black screen for Construct 3 games.

Add "WindowsWebview2Wrapper" to wgc_whole_match_classes and add
compatibility entries for window capture BitBlt and game capture
warnings.

Closes #13359
2026-08-24 16:16:27 -04:00
Kira-NTandRyan Foster 7e22ed2d48 win-capture: Improve fullscreen window detection
It's not that uncommon for apps on Windows to use a hacky method of
extending their windows 1-2px past the supported monitor resolution
to preserve "true" windowed fullscreen and circumvent some exclusive
fullscreen-related issues presented by their graphics library,
Windows itself, or both.

Therefore, the fullscreen detection technique has been relaxed
to properly identify windows slightly larger than the monitor's
viewport as fullscreen.

Windows also does something similar, evident by the fact that
the taskbar disappears, as it always does for fullscreen windows,
even when a window stretches slightly beyond the defined viewport.
2026-08-22 16:02:45 -04:00
PenwywernandRyan Foster 19a1eff8d3 win-capture: Reorder capture method dropdown 2026-08-20 21:41:32 -04:00
PenwywernandRyan Foster e6f6487d7b win-capture: Change capture methods name 2026-08-20 21:41:32 -04:00
Richard StanwayandRyan Foster 88de106cff frontend, plugins: Remove PreferSystem32Images mitigation
This process mitigation flag is inherited by child processes and applies
to load-time DLL resolution, pushing the application's own directory
below the system directories. If there are system-installed copies of
dependent DLLs such as FFmpeg, those get loaded when OBS is updated as
the updater and subsequent relaunch of OBS inherit the mitigation.

As we use SetDefaultDllDirectories, this mitigation is less important,
the proper fix would be to use /DEPENDENTLOADFLAG to protect load-time
import resolution.
2026-08-04 17:19:45 -04:00
Richard StanwayandRyan Foster e2e0bfc8fc win-capture: Log hook DLL install / update errors
We suspect users hit errors updating the system-wide hook files even if
the file is not in use, but without logging we have no way to know for
sure. This commit adds additional logs. Not logging source paths
anywhere is intentional to avoid wide char to utf-8 issues making this
more complicated than it needs to be - the source will always be the OBS
install dir regardless.
2026-07-24 17:31:49 -04:00
Richard StanwayandRyan Foster d7a6a8e1b7 win-capture: Resolve inject helper and hook path to absolute paths 2026-07-24 11:40:08 -04:00
Matt GajownikandRyan Foster f2db0972ee Update translations from Crowdin 2026-07-09 14:48:07 -04:00
Benedict EtzelandRyan Foster 27ac23ef75 win-capture: Add Hearthstone Deck Tracker to compatibility list 2026-06-29 14:53:19 -04:00
Matt GajownikandRyan Foster b631635a38 win-capture: Build with file descriptor 2026-06-26 15:19:41 -04:00
PatTheMavandRyan Foster cb9b4f119a plugins: Apply clang-format 22 formatting 2026-06-17 15:17:09 -04:00
PatTheMavandRyan Foster d838e11983 plugins: Force C language for clang-format
Only applies to actual C-based plugins.
2026-06-17 15:17:09 -04:00
Warchamp7andRyan Foster 30b63c6849 Update C++ files with braces 2026-06-09 13:41:19 -04:00
Richard StanwayandRyan Foster e29a640ddd obs-ffmpeg, win-capture: Use better default DLL directory settings 2026-06-05 15:27:30 -04:00
Matt GajownikandRyan Foster a5f0988933 Update translations from Crowdin 2026-01-10 01:02:43 -05:00
Matt GajownikandRyan Foster 99c3a4b797 Update translations from Crowdin 2025-09-08 22:38:40 -04:00
Gol-D-AceandRyan Foster 9a4632ecb4 win-capture: Add Wuthering Waves to compatibility list 2025-07-02 13:30:49 -04:00
Gol-D-AceandRyan Foster d92cb156fc win-capture: Add Roblox to compatibility list 2025-07-01 15:04:20 -04:00
Matt GajownikandRyan Foster 70c85f9875 Update translations from Crowdin 2025-07-01 13:34:08 -04:00
Matt GajownikandRyan Foster ffef7504ac Update translations from Crowdin 2025-06-09 14:55:50 -04:00
Ryan Foster 8bf9ec6945 win-capture: Fix crash if cursor size is zero 2025-05-23 13:49:52 -04:00
Ryan Foster c86de0587a win-capture: Fix crash if no display is available
If no displays are available, numPath or numMode can be 0, which will
result in a bmalloc(0) call and OBS will crash.
2025-05-05 19:23:36 -04:00
jeieaandRyan Foster 55673966cf win-capture: Fix warnings with Visual Studio 2022 17.14
Following error occurs with Visual Studio 2022 v17.14 Preview 4.0 and
Windows 11 SDK 10.0.26100.0.

duplicator-monitor-capture.c(766,35): error C2220: the following warning
is treated as an error
duplicator-monitor-capture.c(766,35): warning C5287: operands are
different enum types
'window_capture_method' and 'display_capture_method'; use an explicit
cast to silence this warning

The warning is reasonable, so change mismatched enum type.
2025-05-02 16:59:57 -04:00
Tom HaffendenandRyan Foster b8f7c77937 win-capture: Update hooked state before unhooked signal
If the get_hooked procedure is called during the unhooked signal
the source would still report that it's hooked because gc->capturing
hasn't been updated yet.
2025-04-28 14:44:22 -04:00
Malcolm BechardandRyan Foster 343ae6015a graphics-hook: Fix crash with Vulkan DirectDisplay
Vulkan Direct Display uses extensions:
VK_KHR_display/VK_EXT_direct_mode_display
This workflow allows creating swapchains that arn't active on the
desktop, so they don't have HWNDs.
Avoid trying to create swap_data when a HWND can't be found.

Fixes #11581
2025-04-23 17:24:29 -04:00
prgmitchellandRyan Foster b64f549ec9 win-capture: Add FragPunk to compatibility list 2025-03-12 17:32:18 -04:00
PatTheMavandRyan Foster df97bddd87 cmake: Update cross-platform build project management for Windows
Enables creation of x64 and x86 child projects when building on ARM64
and decouples functionality from legacy_check function
2025-03-12 16:33:00 -04:00
Mirza ÖzokyayandRyan Foster 90570e7a70 libobs,win-capture,win-wasapi: Fix typo in macro WIN32_LEAN_AND_MEAN
Fix the macro to prevent unnecessary headers from being included by
<windows.h>. This reduces compilation time and may prevent future bugs
due to unexpected includes.
2025-03-03 16:13:36 -05:00
ChrisandGitHub e3b518d08f win-capture: Add The Bazaar to compatibility list (#11601) 2024-12-09 02:12:54 -06:00
Gol-D-AceandGitHub fbf2ea1a82 win-capture: Add Marvel Rivals to compatibility list (#11594) 2024-12-08 12:25:11 -06:00
Translation UpdaterandTranslation Updater 0b2c85845e Update translations from Crowdin 2024-12-06 23:21:55 +00:00
confusionattackandLain 4652daf748 win-capture: Avoid NULL deref when capture not initialized 2024-11-16 11:32:10 -08:00
Charlese2andRyan Foster 0b87f533b2 graphics-hook: Fix null pointer dereference
Multiple APIs may be set up to capture without being initialized in
graphics-hook when multiple threads are sending present calls. This just
prevents those invalid captures from completing.
2024-10-31 12:46:04 -04:00
Translation UpdaterandTranslation Updater e6d9f73736 Update translations from Crowdin 2024-10-05 05:02:27 +00:00
Ryan Foster a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
PatTheMavandRyan Foster 6c590805e8 cmake: Update supported CMake version range to 3.28 and 3.30 2024-09-13 14:42:32 -04:00
Scott CooperandLain dfe6151465 win-capture: Fix segfault when calling data.free()
data.free should be checked before calling.
2024-09-07 16:09:03 -07:00
Lain a1db1e8482 win-capture: Fix display capture capturing on create
Prevents Display capture from capturing the first display on creation.
This issue is due to the properties view combo box automatically
selecting the first item in the list by default, but this needs explicit
text anyway to indicate display, so this adds a "[Select a display]"
item that will prevent that from happening and tell the user to select a
display.
2024-09-03 13:28:29 -07:00
Lain e9c8e10729 win-capture: Fix window capture capturing random windows
This is due to the property view widget not having an item to select, so
it selects the first one, but we want to have specific text for this
anyway, so changing it here is still appropriate. (I don't want to touch
the properties view widget right now for the sake of my sanity)
2024-09-03 13:28:29 -07:00
PatTheMavandRyan Foster 46b5f7e6d0 plugins: Remove CMake legacy code paths for Windows modules 2024-08-22 15:39:00 -04:00
PatTheMavandRyan Foster af2aa9b6ff shared: Remove shared interface libraries from their original locations 2024-08-20 16:00:21 -04:00
PatTheMavandRyan Foster d81fcd70e0 cmake: Update cross-platform build project management for Windows
Enables creation of x64 and x86 child projects when building on ARM64
and decouples functionality from legacy_check function
2024-08-20 16:00:21 -04:00
qhy040404andLain 32b3517ef1 libobs: Also determine WinUI 3 Window 2024-08-17 17:16:06 -07:00
PatTheMavandRyan Foster b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
tytan652 4b0b71ad5f deps,shared,win-capture: Move ipc-util to shared folder 2024-07-27 07:38:36 +02:00
tytan652 f293a6edd1 deps,shared,plugins: Move file-updater to shared folder 2024-07-27 07:38:36 +02:00
Gol-D-AceandRyan Foster ce6f9a4742 win-capture: Add Zenless Zone Zero to compatibility list 2024-07-24 16:05:26 -04:00
Translation UpdaterandTranslation Updater e7d6707fa7 Update translations from Crowdin 2024-07-17 09:34:12 +00:00
Translation UpdaterandTranslation Updater 8999d9fef9 Update translations from Crowdin 2024-06-07 09:47:58 +00:00
PatTheMavandRyan Foster 14654807cb win-capture: Add missing MSVC runtime setting to 32-bit build 2024-03-16 19:36:33 -04:00