Created
January 19, 2022 22:05
-
-
Save EngineerSmith/7ae2b15682267c5676c7b12bea71433c to your computer and use it in GitHub Desktop.
Hide love2d window using SDL2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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