From 1c58727ca973bb20e1d74c1556bf5314821a342c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20B=C3=A4rtschi?= Date: Thu, 4 Jun 2020 15:28:47 +0200 Subject: [PATCH] Change position datatype from int to double (as it is in OBS) --- src/WSRequestHandler_SceneItems.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WSRequestHandler_SceneItems.cpp b/src/WSRequestHandler_SceneItems.cpp index c1fd85228..8b91d4dff 100644 --- a/src/WSRequestHandler_SceneItems.cpp +++ b/src/WSRequestHandler_SceneItems.cpp @@ -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 (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)} `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.x` The new x 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 {double (optional)} `rotation` The new clockwise rotation of the item in degrees. * @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; 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")) { - newPosition.y = obs_data_get_int(reqPosition, "y"); + newPosition.y = obs_data_get_double(reqPosition, "y"); } if (obs_data_has_user_value(reqPosition, "alignment")) {