Mercurial > touhou
view pytouhou/ui/sdl/backend.pyx @ 754:a6875f90c141
Python: Only init SDL2 video if using SDL2 frontend.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 04 Jan 2021 20:39:30 +0100 |
parents | 80687f258001 |
children |
line wrap: on
line source
cimport pytouhou.lib.sdl as sdl from pytouhou.lib.sdl cimport Window GameRenderer = None def init(_): global GameRenderer from pytouhou.ui.sdl.gamerenderer import GameRenderer def create_window(title, x, y, width, height, _): window = Window(title, x, y, width, height, sdl.WINDOW_SHOWN) window.create_renderer(0) return window