mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-05 02:58:04 +00:00
Updated rcheevos to 7.0.2
This commit is contained in:
parent
48e9dd6baf
commit
60010b4545
10
deps/rcheevos/CHANGELOG.md
vendored
10
deps/rcheevos/CHANGELOG.md
vendored
@ -1,3 +1,13 @@
|
||||
# v7.0.2
|
||||
|
||||
* Make sure the code is C89-compliant
|
||||
* Use 32-bit types in Lua
|
||||
* Only evaluate Lua operands when the Lua state is not `NULL`
|
||||
|
||||
# v7.0.1
|
||||
|
||||
* Fix the alignment of memory allocations
|
||||
|
||||
# v7.0.0
|
||||
|
||||
* Removed **rjson**
|
||||
|
32
deps/rcheevos/src/rcheevos/operand.c
vendored
32
deps/rcheevos/src/rcheevos/operand.c
vendored
@ -319,27 +319,27 @@ unsigned rc_evaluate_operand(rc_operand_t* self, rc_peek_t peek, void* ud, lua_S
|
||||
return 0;
|
||||
|
||||
case RC_OPERAND_LUA:
|
||||
lua_rawgeti(L, LUA_REGISTRYINDEX, self->function_ref);
|
||||
lua_pushcfunction(L, rc_luapeek);
|
||||
if (L != 0) {
|
||||
lua_rawgeti(L, LUA_REGISTRYINDEX, self->function_ref);
|
||||
lua_pushcfunction(L, rc_luapeek);
|
||||
|
||||
luapeek.peek = peek;
|
||||
luapeek.ud = ud;
|
||||
luapeek.peek = peek;
|
||||
luapeek.ud = ud;
|
||||
|
||||
lua_pushlightuserdata(L, &luapeek);
|
||||
|
||||
if (lua_pcall(L, 2, 1, 0) == LUA_OK) {
|
||||
if (lua_isboolean(L, -1)) {
|
||||
value = lua_toboolean(L, -1);
|
||||
lua_pushlightuserdata(L, &luapeek);
|
||||
|
||||
if (lua_pcall(L, 2, 1, 0) == LUA_OK) {
|
||||
if (lua_isboolean(L, -1)) {
|
||||
value = lua_toboolean(L, -1);
|
||||
}
|
||||
else {
|
||||
value = (unsigned)lua_tonumber(L, -1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
value = (unsigned)lua_tonumber(L, -1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
value = 0;
|
||||
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
lua_pop(L, 1);
|
||||
break;
|
||||
|
||||
case RC_OPERAND_ADDRESS:
|
||||
|
2
deps/rcheevos/test/Makefile
vendored
2
deps/rcheevos/test/Makefile
vendored
@ -19,7 +19,7 @@ OBJ=$(RC_SRC)/trigger.o $(RC_SRC)/condset.o $(RC_SRC)/condition.o $(RC_SRC)/oper
|
||||
all: test
|
||||
|
||||
%.o: %.c
|
||||
gcc -Wall -O0 -g -I../include -I$(RC_SRC) -I$(LUA_SRC) -c $< -o $@
|
||||
gcc -Wall -O0 -g -std=c89 -ansi -Wno-long-long -DLUA_32BITS -I../include -I$(RC_SRC) -I$(LUA_SRC) -c $< -o $@
|
||||
|
||||
test: $(OBJ)
|
||||
gcc -o $@ $+ -lm
|
||||
|
Loading…
x
Reference in New Issue
Block a user