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

win-capture,UI: Look up display by id, not index

Open jpark37 opened this issue 3 years ago • 0 comments

Description

The index is not reliable. The id persists better, so use that.

Also remove matching against the first monitor if the expected monitor is not available. That feature seems like a good way to get doxxed by accident.

Fixes #5329

Motivation and Context

Want display capture target to be stable.

How Has This Been Tested?

Two monitors:

  • Much toggling between DXGI/WGC capture modes.
  • Much toggling between monitors.
  • Unplug/replug both monitors on both capture types.
  • Logging changes work as expected.
  • Display toggling via context bar still works.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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.

jpark37 avatar Aug 13 '22 07:08 jpark37