mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Requests: Fix leak in ReleaseTBar, SetTBarPosition
This commit is contained in:
parent
9311b38747
commit
4ea010f168
@ -144,9 +144,9 @@ RpcResponse WSRequestHandler::GetTransitionPosition(const RpcRequest& request) {
|
||||
* Get the current settings of a transition
|
||||
*
|
||||
* @param {String} `transitionName` Transition name
|
||||
*
|
||||
*
|
||||
* @return {Object} `transitionSettings` Current transition settings
|
||||
*
|
||||
*
|
||||
* @api requests
|
||||
* @name GetTransitionSettings
|
||||
* @category transitions
|
||||
@ -175,9 +175,9 @@ RpcResponse WSRequestHandler::GetTransitionSettings(const RpcRequest& request) {
|
||||
*
|
||||
* @param {String} `transitionName` Transition name
|
||||
* @param {Object} `transitionSettings` Transition settings (they can be partial)
|
||||
*
|
||||
*
|
||||
* @return {Object} `transitionSettings` Updated transition settings
|
||||
*
|
||||
*
|
||||
* @api requests
|
||||
* @name SetTransitionSettings
|
||||
* @category transitions
|
||||
@ -219,7 +219,8 @@ RpcResponse WSRequestHandler::ReleaseTBar(const RpcRequest& request) {
|
||||
return request.failed("studio mode not enabled");
|
||||
}
|
||||
|
||||
if (obs_transition_fixed(obs_frontend_get_current_transition())) {
|
||||
OBSSourceAutoRelease transition = obs_frontend_get_current_transition();
|
||||
if (obs_transition_fixed(transition)) {
|
||||
return request.failed("current transition doesn't support t-bar control");
|
||||
}
|
||||
|
||||
@ -231,7 +232,7 @@ RpcResponse WSRequestHandler::ReleaseTBar(const RpcRequest& request) {
|
||||
/**
|
||||
* Set the manual position of the T-Bar (in Studio Mode) to the specified value. Will return an error if OBS is not in studio mode
|
||||
* or if the current transition doesn't support T-Bar control.
|
||||
*
|
||||
*
|
||||
* If your code needs to perform multiple successive T-Bar moves (e.g. : in an animation, or in response to a user moving a T-Bar control in your User Interface), set `release` to false and call `ReleaseTBar` later once the animation/interaction is over.
|
||||
*
|
||||
* @param {double} `position` T-Bar position. This value must be between 0.0 and 1.0.
|
||||
@ -247,7 +248,8 @@ RpcResponse WSRequestHandler::SetTBarPosition(const RpcRequest& request) {
|
||||
return request.failed("studio mode not enabled");
|
||||
}
|
||||
|
||||
if (obs_transition_fixed(obs_frontend_get_current_transition())) {
|
||||
OBSSourceAutoRelease transition = obs_frontend_get_current_transition();
|
||||
if (obs_transition_fixed(transition)) {
|
||||
return request.failed("current transition doesn't support t-bar control");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user