obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

win-capture: Add compatibility notices

Open derrod opened this issue 2 years ago • 5 comments

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): 2023-02-05_17-26-21_mGUCRU

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.

derrod avatar Jan 18 '23 01:01 derrod

Based on off-chain feedback translation is a potential issue.

My idea would be:

  • Add translation_key and title 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

derrod avatar Jan 19 '23 07:01 derrod

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: 2023-01-19_10-20-36_oP3AAZ

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.

derrod avatar Jan 19 '23 09:01 derrod

Rebased on master with the following changes:

  • Removed labels (as discussed off-chain yesterday)
  • Added explanation of severity labels to schema
  • Squashed commits

derrod avatar Feb 05 '23 14:02 derrod

Gave this a try and it looks like if no application is selected it defaults to the CSGO message for me. Screenshot_20230205-162221-489

Gol-D-Ace avatar Feb 05 '23 15:02 Gol-D-Ace

Yeah I didn't consider the "any" case. I fixed that now (Also added GTA:SA and SAMP entries based on Discord discussion).

derrod avatar Feb 05 '23 15:02 derrod

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

derrod avatar Mar 02 '23 13:03 derrod