We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae97c23 commit d754849Copy full SHA for d754849
tcod/cffi.py
@@ -45,9 +45,8 @@ def get_architecture() -> str:
45
46
47
def get_sdl_version() -> str:
48
- sdl_version = ffi.new("SDL_version*")
49
- lib.SDL_GetVersion(sdl_version)
50
- return f"{sdl_version.major}.{sdl_version.minor}.{sdl_version.patch}"
+ int_version = lib.SDL_GetVersion()
+ return f"{int_version // 1000000}.{(int_version // 1000) % 1000}.{int_version % 1000}"
51
52
53
if sys.platform == "win32":
0 commit comments