Change position datatype from int to double (as it is in OBS)

This commit is contained in:
Lars Bärtschi 2020-06-04 15:28:47 +02:00
parent 612bd9960c
commit 1c58727ca9

View File

@ -79,8 +79,8 @@ RpcResponse WSRequestHandler::GetSceneItemProperties(const RpcRequest& request)
* @param {String | Object} `item` Scene Item name (if this field is a string) or specification (if it is an object). * @param {String | Object} `item` Scene Item name (if this field is a string) or specification (if it is an object).
* @param {String (optional)} `item.name` Scene Item name (if the `item` field is an object) * @param {String (optional)} `item.name` Scene Item name (if the `item` field is an object)
* @param {int (optional)} `item.id` Scene Item ID (if the `item` field is an object) * @param {int (optional)} `item.id` Scene Item ID (if the `item` field is an object)
* @param {int (optional)} `position.x` The new x position of the source. * @param {double (optional)} `position.x` The new x position of the source.
* @param {int (optional)} `position.y` The new y position of the source. * @param {double (optional)} `position.y` The new y position of the source.
* @param {int (optional)} `position.alignment` The new alignment of the source. * @param {int (optional)} `position.alignment` The new alignment of the source.
* @param {double (optional)} `rotation` The new clockwise rotation of the item in degrees. * @param {double (optional)} `rotation` The new clockwise rotation of the item in degrees.
* @param {double (optional)} `scale.x` The new x scale of the item. * @param {double (optional)} `scale.x` The new x scale of the item.
@ -134,10 +134,10 @@ RpcResponse WSRequestHandler::SetSceneItemProperties(const RpcRequest& request)
vec2 newPosition = oldPosition; vec2 newPosition = oldPosition;
if (obs_data_has_user_value(reqPosition, "x")) { if (obs_data_has_user_value(reqPosition, "x")) {
newPosition.x = obs_data_get_int(reqPosition, "x"); newPosition.x = obs_data_get_double(reqPosition, "x");
} }
if (obs_data_has_user_value(reqPosition, "y")) { if (obs_data_has_user_value(reqPosition, "y")) {
newPosition.y = obs_data_get_int(reqPosition, "y"); newPosition.y = obs_data_get_double(reqPosition, "y");
} }
if (obs_data_has_user_value(reqPosition, "alignment")) { if (obs_data_has_user_value(reqPosition, "alignment")) {