diff --git a/src/headers/switcher-data-structs.hpp b/src/headers/switcher-data-structs.hpp index 8dae27d3..c11d5d06 100644 --- a/src/headers/switcher-data-structs.hpp +++ b/src/headers/switcher-data-structs.hpp @@ -104,7 +104,7 @@ struct SceneRoundTripSwitch { inline SceneRoundTripSwitch(OBSWeakSource scene1_, OBSWeakSource scene2_, - OBSWeakSource transition_, int delay_, + OBSWeakSource transition_, double delay_, bool usePreviousScene_, std::string str) : scene1(scene1_), scene2(scene2_), diff --git a/src/scene-round-trip.cpp b/src/scene-round-trip.cpp index 06393675..9ca0313e 100644 --- a/src/scene-round-trip.cpp +++ b/src/scene-round-trip.cpp @@ -368,12 +368,12 @@ void SwitcherData::loadSceneRoundTripSwitches(obs_data_t *obj) // To be removed in future version // to be compatible with older versions if (!obs_data_has_user_value(array_obj, "delay")) { - delay = obs_data_get_int(array_obj, - "sceneRoundTripDelay"); - delay = delay * 1000 + - obs_data_get_int(array_obj, - "sceneRoundTripDelayMs"); - delay /= 1000; + delay = double(obs_data_get_int(array_obj, + "sceneRoundTripDelay")); + delay = delay * 1000. + + double(obs_data_get_int( + array_obj, "sceneRoundTripDelayMs")); + delay /= 1000.; } else { delay = obs_data_get_double(array_obj, "delay"); } @@ -402,7 +402,7 @@ void SceneSwitcher::setupSequenceTab() populateSceneSelection(ui->sceneRoundTripScenes2, true); populateTransitionSelection(ui->sceneRoundTripTransitions); - int smallestDelay = switcher->interval; + double smallestDelay = double(switcher->interval) / 1000; for (auto &s : switcher->sceneRoundTripSwitches) { std::string sceneName1 = GetWeakSourceName(s.scene1); std::string sceneName2 = (s.usePreviousScene)