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

win-capture: Update hooked state before unhooked signal

Open EZ64cool opened this issue 10 months ago • 2 comments

Description

Move the game-capture's gc->capturing = false update to before the unhooked signal is sent. This replicates the behaviour of window-capture.

Motivation and Context

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.

How Has This Been Tested?

Tested on windows 10 x64 and it now works as expected. It's a very isolated change so easy to test.

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.

EZ64cool avatar Mar 30 '24 12:03 EZ64cool