Merge pull request #1155 from DDRBoxman/scripting
deps/obs-scripting: Various scripting fixes
This commit is contained in:
commit
8d60404663
@ -271,6 +271,7 @@ target_link_libraries(obs
|
|||||||
${obs_PLATFORM_LIBRARIES})
|
${obs_PLATFORM_LIBRARIES})
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
set_target_properties(obs PROPERTIES LINK_FLAGS "-pagezero_size 10000 -image_base 100000000")
|
||||||
set_property(
|
set_property(
|
||||||
TARGET obs
|
TARGET obs
|
||||||
APPEND
|
APPEND
|
||||||
|
6
deps/obs-scripting/obs-scripting-lua.c
vendored
6
deps/obs-scripting/obs-scripting-lua.c
vendored
@ -111,6 +111,8 @@ static bool load_lua_script(struct obs_lua_script *data)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_lua_script = data;
|
||||||
|
|
||||||
add_lua_source_functions(script);
|
add_lua_source_functions(script);
|
||||||
add_hook_functions(script);
|
add_hook_functions(script);
|
||||||
#if UI_ENABLED
|
#if UI_ENABLED
|
||||||
@ -171,8 +173,6 @@ static bool load_lua_script(struct obs_lua_script *data)
|
|||||||
else
|
else
|
||||||
data->save = LUA_REFNIL;
|
data->save = LUA_REFNIL;
|
||||||
|
|
||||||
current_lua_script = data;
|
|
||||||
|
|
||||||
lua_getglobal(script, "script_defaults");
|
lua_getglobal(script, "script_defaults");
|
||||||
if (lua_isfunction(script, -1)) {
|
if (lua_isfunction(script, -1)) {
|
||||||
ls_push_libobs_obj(obs_data_t, data->base.settings, false);
|
ls_push_libobs_obj(obs_data_t, data->base.settings, false);
|
||||||
@ -214,7 +214,7 @@ fail:
|
|||||||
pthread_mutex_unlock(&data->mutex);
|
pthread_mutex_unlock(&data->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success) {
|
if (!success && script) {
|
||||||
lua_close(script);
|
lua_close(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
deps/obs-scripting/obslua/obslua.i
vendored
2
deps/obs-scripting/obslua/obslua.i
vendored
@ -8,6 +8,7 @@
|
|||||||
#include <graphics/vec3.h>
|
#include <graphics/vec3.h>
|
||||||
#include <graphics/vec2.h>
|
#include <graphics/vec2.h>
|
||||||
#include <graphics/quat.h>
|
#include <graphics/quat.h>
|
||||||
|
#include <graphics/image-file.h>
|
||||||
#include <obs.h>
|
#include <obs.h>
|
||||||
#include <obs-hotkey.h>
|
#include <obs-hotkey.h>
|
||||||
#include <obs-source.h>
|
#include <obs-source.h>
|
||||||
@ -81,6 +82,7 @@ static inline void wrap_blog(int log_level, const char *message)
|
|||||||
%include "graphics/vec3.h"
|
%include "graphics/vec3.h"
|
||||||
%include "graphics/vec2.h"
|
%include "graphics/vec2.h"
|
||||||
%include "graphics/quat.h"
|
%include "graphics/quat.h"
|
||||||
|
%include "graphics/image-file.h"
|
||||||
%include "obs-data.h"
|
%include "obs-data.h"
|
||||||
%include "obs-source.h"
|
%include "obs-source.h"
|
||||||
%include "obs-properties.h"
|
%include "obs-properties.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user