obs-studio
obs-studio copied to clipboard
win-capture: Add compatibility notices
Description
Adds text warnings with optional URLs to window and game capture to notify users about incompatibilities using the new text labels introduced in #5160.
The update mechanism for the compatibility data is the same as used in rtmp-services, meaning that it will fetch updated data from the obsproject website on startup.
Screenshots:
Window capture (warning):
Motivation and Context
Provide in-app guidance for users when things don't work in case of known compatibility issues.
How Has This Been Tested?
Mucked about locally.
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
Based on off-chain feedback translation is a potential issue.
My idea would be:
- Add
translation_key
andtitle
properties to JSON - Provide translatable generic messages, like
%title% may require OBS to be run as admin to use Game Capture
- Provide translatable specific messages, e.g. for CSGO and Minecraft
OBS would then:
- If the translation key exists, attempt to replace variables in generic messages, i.e.
%title%
in string =>title
from JSON - If no translation key exists, e.g. outdated OBS version or new entry where generic messages couldn't be used, use message from JSON instead
This is now implemented as such, the JSON had the following two keys added:
"name": "Chrome",
"translation_key": "Compatibility.WindowCapture.BitBlt",
This key is then looked up in the translation file:
Compatibility.WindowCapture.BitBlt="%name% cannot be captured using BitBlt window capture, switch to WGC mode instead."
And the placeholder replaced before it is displayed:
The message in the JSON serves as a fallback that can be used when a translated message is not (yet) available in OBS. For instance, when a new game releases and has a specific issue that we want to make users aware of.
Rebased on master with the following changes:
- Removed labels (as discussed off-chain yesterday)
- Added explanation of severity labels to schema
- Squashed commits
Gave this a try and it looks like if no application is selected it defaults to the CSGO message for me.
Yeah I didn't consider the "any" case. I fixed that now (Also added GTA:SA and SAMP entries based on Discord discussion).
Based on Flaeri's feedback:
- Removed Valorant (seems to be no longer reuqired, possibly never was)
- Added generic Electron entries to BitBlt Window Capture and Game Capture
- Window Capture will default to WGC for Electron apps, so only a "notice" severity
- For Game Capture this affects titles such as Vampire Survivors that are built using Electron. See https://steamdb.info/tech/SDK/Greenworks/ for a list of many affected titles