Functions that receive ConfigFlags now use the enum instead of a c_uint (Fixes #25)

This commit is contained in:
Not-Nik 2022-08-23 16:10:44 +02:00
parent 55d024fbe3
commit 3a7b9f0009
Failed to generate hash of commit
2 changed files with 7 additions and 4 deletions

View file

@ -50,7 +50,7 @@ def fix_pointer(name: str, t: str):
def fix_enums(arg_name, arg_type, func_name):
# Hacking specifc enums in here
# Raylib doesn't use the enums but rather the resulting ints
if arg_type == "int":
if arg_type == "int" or arg_type == "unsigned int":
if arg_name == "key":
arg_type = "KeyboardKey"
elif arg_name == "button":
@ -62,6 +62,8 @@ def fix_enums(arg_name, arg_type, func_name):
arg_type = "CameraMode"
elif arg_name == "gesture":
arg_type = "Gestures"
elif arg_name == "flags" and func_name in ["SetWindowState", "ClearWindowState", "SetConfigFlags"]:
arg_type = "ConfigFlags"
return arg_type