Skip to content

Commit d754849

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Upgrade to use SDL3 version of libtcod
1 parent ae97c23 commit d754849

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tcod/cffi.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ def get_architecture() -> str:
4545

4646

4747
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}"
48+
int_version = lib.SDL_GetVersion()
49+
return f"{int_version // 1000000}.{(int_version // 1000) % 1000}.{int_version % 1000}"
5150

5251

5352
if sys.platform == "win32":

0 commit comments

Comments
 (0)