mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Merge branch 'master' into 12.0-development
This commit is contained in:
@@ -1134,9 +1134,11 @@ Type *luax_type(lua_State *L, int idx)
|
||||
return Type::byName(luaL_checkstring(L, idx));
|
||||
}
|
||||
|
||||
int luax_resume(lua_State *L, int nargs)
|
||||
int luax_resume(lua_State *L, int nargs, int* nres)
|
||||
{
|
||||
#if LUA_VERSION_NUM >= 502
|
||||
#if LUA_VERSION_NUM >= 504
|
||||
return lua_resume(L, nullptr, nargs, nres);
|
||||
#elif LUA_VERSION_NUM >= 502
|
||||
return lua_resume(L, nullptr, nargs);
|
||||
#else
|
||||
return lua_resume(L, nargs);
|
||||
|
||||
@@ -709,7 +709,7 @@ int luax_catchexcept(lua_State *L, const T& func, const F& finallyfunc)
|
||||
* Compatibility shim for lua_resume
|
||||
* Exported because it's used in the launcher
|
||||
**/
|
||||
LOVE_EXPORT int luax_resume(lua_State *L, int nargs);
|
||||
LOVE_EXPORT int luax_resume(lua_State *L, int nargs, int* nres);
|
||||
|
||||
} // love
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
#include <string.h>
|
||||
#include "glad.hpp"
|
||||
|
||||
namespace glad {
|
||||
|
||||
|
||||
#ifdef GLAD_USE_SDL
|
||||
#include <SDL.h>
|
||||
@@ -13,6 +9,10 @@ namespace glad {
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include "glad.hpp"
|
||||
|
||||
namespace glad {
|
||||
|
||||
bool gladLoadGL(void) {
|
||||
#ifdef GLAD_USE_SDL
|
||||
return gladLoadGLLoader(SDL_GL_GetProcAddress);
|
||||
|
||||
@@ -73,7 +73,9 @@
|
||||
typedef size_t lua_Unsigned;
|
||||
#endif
|
||||
|
||||
#if LUA_VERSION_NUM == 501
|
||||
#if LUA_VERSION_NUM >= 504
|
||||
# define LUAL_BUFFER53_BUFFER(B) (B)->b.b
|
||||
#elif LUA_VERSION_NUM == 501
|
||||
# define LUAL_BUFFER53_BUFFER(B) (B)->b.buffer
|
||||
#else
|
||||
# define LUAL_BUFFER53_BUFFER(B) (B)->b.initb
|
||||
|
||||
@@ -309,8 +309,7 @@ int luaopen_luautf8 (lua_State *L) {
|
||||
lua_setfield(L, -2, l->name);
|
||||
}
|
||||
}
|
||||
lua_pushliteral(L, UTF8PATT);
|
||||
lua_pushlstring(L, UTF8PATT, sizeof(UTF8PATT) / sizeof(char) - 1);
|
||||
lua_setfield(L, -2, "charpattern");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -221,8 +221,13 @@ static DoneAction runlove(int argc, char **argv, int &retval, love::Variant &res
|
||||
lua_newthread(L);
|
||||
lua_pushvalue(L, -2);
|
||||
int stackpos = lua_gettop(L);
|
||||
while (love::luax_resume(L, 0) == LUA_YIELD)
|
||||
int nres;
|
||||
while (love::luax_resume(L, 0, &nres) == LUA_YIELD)
|
||||
#if LUA_VERSION_NUM >= 504
|
||||
lua_pop(L, nres);
|
||||
#else
|
||||
lua_pop(L, lua_gettop(L) - stackpos);
|
||||
#endif
|
||||
|
||||
retval = 0;
|
||||
DoneAction done = DONE_QUIT;
|
||||
|
||||
@@ -673,7 +673,7 @@ function love.errhand(msg)
|
||||
love.graphics.reset()
|
||||
local font = love.graphics.setNewFont(14)
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
love.graphics.setColor(1, 1, 1)
|
||||
|
||||
local trace = debug.traceback()
|
||||
|
||||
|
||||
@@ -1347,7 +1347,7 @@ const unsigned char boot_lua[] =
|
||||
0x6e, 0x74, 0x28, 0x31, 0x34, 0x29, 0x0a,
|
||||
0x0a,
|
||||
0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x29, 0x0a,
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x2c, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x29, 0x0a,
|
||||
0x0a,
|
||||
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x74, 0x72, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x64, 0x65, 0x62,
|
||||
0x75, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x29, 0x0a,
|
||||
|
||||
Reference in New Issue
Block a user