1 Star 0 Fork 0

梦归云帆/wxPython_WallpaperEngine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pysdl2.py 721 Bytes
一键复制 编辑 原始数据 按行查看 历史
梦归云帆 提交于 2023-09-27 12:55 . point
import os
import sys
dllpath = os.path.join('./libSDL/')
print(dllpath)
os.environ["PYSDL2_DLL_PATH"] = dllpath
import sdl2,sdl2.ext
print(sdl2.SDL_GetRevision())
def run():
sdl2.ext.init()
winflag = (sdl2.SDL_WINDOW_ALLOW_HIGHDPI)
window = sdl2.ext.Window("The Pong Game", size=(800, 600) ,flags=winflag)
window.show()
renderer = sdl2.ext.Renderer(window)
video_file = "./src/2233.mp4"
renderer.
video_texture = renderer.create_texture_from_file(video_file)
running = True
while running:
events = sdl2.ext.get_events()
##print(events)
for event in events:
if event.type == sdl2.SDL_QUIT:
running = False
break
window.refresh()
return 0
if __name__ == "__main__":
sys.exit(run())
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dream-to-cloud-sail/wxPython_WallpaperEngine.git
git@gitee.com:dream-to-cloud-sail/wxPython_WallpaperEngine.git
dream-to-cloud-sail
wxPython_WallpaperEngine
wxPython_WallpaperEngine
main

搜索帮助