Skip to content

Commit

Permalink
improve Windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
myQwil committed Apr 30, 2023
1 parent 81615d3 commit fd40f89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion love/input/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ end

function love.update(dt)
while source:getFreeBufferCount() > 0 do
if i >= n then
if i + step > n then
i = 0
sdIn = mic:getData()
if sdIn then
Expand Down
6 changes: 1 addition & 5 deletions src/luacompat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define lua_rawlen(L,i) lua_objlen(L,(i))

#if LUAJIT_VERSION_NUM < 20100 || defined(_WIN32)
#if LUAJIT_VERSION_NUM < 20100

#define luaL_setmetatable(L,n) (luaL_getmetatable(L,(n)) ,lua_setmetatable(L,-2))
LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
Expand All @@ -25,10 +25,6 @@ LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
lua_pop(L, nup); /* remove upvalues */
}

#endif // _WIN32

#if LUAJIT_VERSION_NUM < 20100

#define LUAL_NUMSIZES (sizeof(lua_Integer)*16 + sizeof(lua_Number))
#define UNUSED(x) ((void)(x))
LUA_API lua_Number lua_version (lua_State *L) {
Expand Down

0 comments on commit fd40f89

Please sign in to comment.