Skip to content

Instantly share code, notes, and snippets.

@EngineerSmith
Created January 19, 2022 22:05
Show Gist options
  • Save EngineerSmith/7ae2b15682267c5676c7b12bea71433c to your computer and use it in GitHub Desktop.
Save EngineerSmith/7ae2b15682267c5676c7b12bea71433c to your computer and use it in GitHub Desktop.
Hide love2d window using SDL2
if love._version_major == "11" and jit then
local ffi = require("ffi")
ffi.cdef[[
typedef void SDL_Window;
SDL_Window* SDL_GL_GetCurrentWindow(void);
void SDL_HideWindow(SDL_Window * window);
]]
local SDL2 = ffi.load("SDL2")
local window = SDL2.SDL_GL_GetCurrentWindow()
SDL2.SDL_HideWindow(window)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment