obs-scripting: Fix python save callback Py_BuildValue

Py_BuildValue doesn't directly accept C bools.
This fixes the callback by passing instead a Py_Bool object built from
the C bool.
This commit is contained in:
Penwywern 2023-05-28 20:07:14 +02:00 committed by Lain
parent 67f7712d83
commit a542d51e59

View file

@ -290,7 +290,8 @@ static void frontend_save_callback(obs_data_t *save_data, bool saving,
PyObject *py_save_data;
if (libobs_to_py(obs_data_t, save_data, false, &py_save_data)) {
PyObject *args = Py_BuildValue("(Op)", py_save_data, saving);
PyObject *args = Py_BuildValue("(ON)", py_save_data,
PyBool_FromLong(saving));
struct python_obs_callback *last_cb = cur_python_cb;
cur_python_cb = cb;