Skip to content

Commit

Permalink
Fix conversion of zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Oct 2, 2024
1 parent 98a85a2 commit c8866c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else()
cmake_minimum_required(VERSION 3.18)
endif()

project(move-transition VERSION 3.1.0)
project(move-transition VERSION 3.1.1)
set(PROJECT_FULL_NAME "Move Transition")

# Set new UUIDs when you start to create a new plugin.
Expand Down
2 changes: 1 addition & 1 deletion buildspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
}
},
"name": "move-transition",
"version": "3.1.0"
"version": "3.1.1"
}
13 changes: 12 additions & 1 deletion move-transition.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,18 @@ static void move_update(void *data, obs_data_t *settings)
move->easing_function_in = obs_data_get_int(settings, S_EASING_FUNCTION_IN);
move->easing_function_out = obs_data_get_int(settings, S_EASING_FUNCTION_OUT);
move->position_in = obs_data_get_int(settings, S_POSITION_IN);
obs_data_item_t *item = obs_data_item_byname(settings, S_ZOOM_IN);
if (obs_data_item_gettype(item) == OBS_DATA_BOOLEAN) {
obs_data_set_double(settings, S_ZOOM_IN, obs_data_get_bool(settings, S_ZOOM_IN) ? 0.0 : 100.0);
}
obs_data_item_release(&item);
move->zoom_in = (float)obs_data_get_double(settings, S_ZOOM_IN) / 100.0f;
move->position_out = obs_data_get_int(settings, S_POSITION_OUT);
item = obs_data_item_byname(settings, S_ZOOM_IN);
if (obs_data_item_gettype(item) == OBS_DATA_BOOLEAN) {
obs_data_set_double(settings, S_ZOOM_OUT, obs_data_get_bool(settings, S_ZOOM_OUT) ? 0.0 : 100.0);
}
obs_data_item_release(&item);
move->zoom_out = (float)obs_data_get_double(settings, S_ZOOM_OUT) / 100.0f;
move->curve_move = (float)obs_data_get_double(settings, S_CURVE_MATCH);
move->curve_in = (float)obs_data_get_double(settings, S_CURVE_IN);
Expand Down Expand Up @@ -3253,6 +3263,7 @@ bool obs_module_load(void)
return true;
}

void obs_module_unload() {
void obs_module_unload()
{
pthread_mutex_destroy(&udp_servers_mutex);
}

0 comments on commit c8866c5

Please sign in to comment.