some changes for rpi (#546)
disable coopnet on rpi until we can get some valid libraries compiled
This commit is contained in:
parent
ffcef729e7
commit
dd278f0b3f
3
Makefile
3
Makefile
|
@ -270,6 +270,7 @@ endif
|
||||||
ifeq ($(TARGET_RPI),1)
|
ifeq ($(TARGET_RPI),1)
|
||||||
$(info Compiling for Raspberry Pi)
|
$(info Compiling for Raspberry Pi)
|
||||||
DISCORD_SDK := 0
|
DISCORD_SDK := 0
|
||||||
|
COOPNET := 0
|
||||||
machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
|
machine = $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
|
||||||
|
|
||||||
# Raspberry Pi B+, Zero, etc
|
# Raspberry Pi B+, Zero, etc
|
||||||
|
@ -1319,7 +1320,7 @@ ifeq ($(VERSION),eu)
|
||||||
$(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/us/define_courses.inc.c
|
$(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/us/define_courses.inc.c
|
||||||
$(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/de/define_courses.inc.c
|
$(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/de/define_courses.inc.c
|
||||||
$(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/fr/define_courses.inc.c
|
$(BUILD_DIR)/src/game/level_info.o: $(BUILD_DIR)/text/fr/define_courses.inc.c
|
||||||
|
|
||||||
O_FILES += $(BUILD_DIR)/bin/eu/translation_en.o $(BUILD_DIR)/bin/eu/translation_de.o $(BUILD_DIR)/bin/eu/translation_fr.o
|
O_FILES += $(BUILD_DIR)/bin/eu/translation_en.o $(BUILD_DIR)/bin/eu/translation_de.o $(BUILD_DIR)/bin/eu/translation_fr.o
|
||||||
else
|
else
|
||||||
ifeq ($(VERSION),sh)
|
ifeq ($(VERSION),sh)
|
||||||
|
|
|
@ -417,15 +417,14 @@ void smlua_push_object(lua_State* L, u16 lot, void* p) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
u64 pointer = (uintptr_t) p;
|
|
||||||
|
|
||||||
// add to allowlist
|
// add to allowlist
|
||||||
smlua_cobject_allowlist_add(lot, pointer);
|
smlua_cobject_allowlist_add(lot, (u64)(intptr_t) p);
|
||||||
|
|
||||||
// get a cobject from a function
|
// get a cobject from a function
|
||||||
lua_getglobal(L, "_NewCObject"); // Get the function by its global name
|
lua_getglobal(L, "_NewCObject"); // Get the function by its global name
|
||||||
lua_pushinteger(L, lot);
|
lua_pushinteger(L, lot);
|
||||||
lua_pushinteger(L, pointer);
|
lua_pushinteger(L, (u64)(intptr_t) p);
|
||||||
|
|
||||||
if (lua_pcall(L, 2, 1, 0) != LUA_OK) {
|
if (lua_pcall(L, 2, 1, 0) != LUA_OK) {
|
||||||
LOG_ERROR("Error calling Lua function: %s\n", lua_tostring(L, -1));
|
LOG_ERROR("Error calling Lua function: %s\n", lua_tostring(L, -1));
|
||||||
|
@ -438,13 +437,12 @@ void smlua_push_pointer(lua_State* L, u16 lvt, void* p) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 pointer = (uintptr_t) p;
|
smlua_cpointer_allowlist_add(lvt, (u64)(intptr_t) p);
|
||||||
smlua_cpointer_allowlist_add(lvt, pointer);
|
|
||||||
|
|
||||||
// get a cpointer from a function
|
// get a cpointer from a function
|
||||||
lua_getglobal(L, "_NewCPointer"); // Get the function by its global name
|
lua_getglobal(L, "_NewCPointer"); // Get the function by its global name
|
||||||
lua_pushinteger(L, lvt);
|
lua_pushinteger(L, lvt);
|
||||||
lua_pushinteger(L, pointer);
|
lua_pushinteger(L, (u64)(intptr_t) p);
|
||||||
if (lua_pcall(L, 2, 1, 0) != LUA_OK) {
|
if (lua_pcall(L, 2, 1, 0) != LUA_OK) {
|
||||||
LOG_ERROR("Error calling Lua function: %s\n", lua_tostring(L, -1));
|
LOG_ERROR("Error calling Lua function: %s\n", lua_tostring(L, -1));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue