-
I was thinking of how to use SDL_CreateWindow and got the following code written. import sdl3
import ctypes
def main():
sdl3.SDL_Init(sdl3.SDL_INIT_VIDEO)
event = sdl3.SDL_Event()
running = True
window = sdl3.SDL_CreateWindow("test".encode(), ctypes.c_int(640), ctypes.c_int(480), sdl3.SDL_WINDOW_MAXIMIZED)
while running:
while sdl3.SDL_PollEvent(ctypes.byref(event)) != 0:
if event.type == sdl3.SDL_EVENT_QUIT:
running = False
break
sdl3.SDL_Delay(ctypes.c_uint32(10))
sdl3.SDL_DestroyWindow(window)
sdl3.SDL_Quit()
return 0
if __name__ == "__main__":
main() |
Beta Was this translation helpful? Give feedback.
Answered by
Aermoss
Jun 23, 2025
Replies: 1 comment 1 reply
-
You can try using a different video driver to see if it works, like this: import os
os.environ["SDL_VIDEO_DRIVER"] = "wayland" # or x11, whichever works.
import sdl3 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
JPLost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can try using a different video driver to see if it works, like this: