controller support and unfocused window added

This commit is contained in:
Mango 2025-08-23 20:48:07 -07:00
commit 94ba18772b
4 changed files with 46 additions and 17 deletions

11
sdl.lua Normal file
View file

@ -0,0 +1,11 @@
local ffi = require("ffi")
ffi.cdef[[
typedef enum
{
SDL_FALSE = 0,
SDL_TRUE = 1
} SDL_bool;
SDL_bool SDL_SetHint(const char *name, const char *value);
]]
local sdl = ffi.os == "Windows" and ffi.load("SDL2") or ffi.C
sdl.SDL_SetHint("SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS", "1")