@@ -1060,9 +1060,9 @@ def __init__(self, type: str, which: int, axis: tcod.sdl.joystick.ControllerAxis
10601060 def from_sdl_event (cls , sdl_event : Any ) -> ControllerAxis :
10611061 return cls (
10621062 "CONTROLLERAXISMOTION" ,
1063- sdl_event .caxis .which ,
1064- tcod .sdl .joystick .ControllerAxis (sdl_event .caxis .axis ),
1065- sdl_event .caxis .value ,
1063+ sdl_event .gaxis .which ,
1064+ tcod .sdl .joystick .ControllerAxis (sdl_event .gaxis .axis ),
1065+ sdl_event .gaxis .value ,
10661066 )
10671067
10681068 def __repr__ (self ) -> str :
@@ -1099,9 +1099,9 @@ def from_sdl_event(cls, sdl_event: Any) -> ControllerButton:
10991099 }[sdl_event .type ]
11001100 return cls (
11011101 type ,
1102- sdl_event .cbutton .which ,
1103- tcod .sdl .joystick .ControllerButton (sdl_event .cbutton .button ),
1104- bool (sdl_event .cbutton .down ),
1102+ sdl_event .gbutton .which ,
1103+ tcod .sdl .joystick .ControllerButton (sdl_event .gbutton .button ),
1104+ bool (sdl_event .gbutton .down ),
11051105 )
11061106
11071107 def __repr__ (self ) -> str :
@@ -1130,7 +1130,7 @@ def from_sdl_event(cls, sdl_event: Any) -> ControllerDevice:
11301130 lib .SDL_EVENT_GAMEPAD_REMOVED : "CONTROLLERDEVICEREMOVED" ,
11311131 lib .SDL_EVENT_GAMEPAD_REMAPPED : "CONTROLLERDEVICEREMAPPED" ,
11321132 }[sdl_event .type ]
1133- return cls (type , sdl_event .cdevice .which )
1133+ return cls (type , sdl_event .gdevice .which )
11341134
11351135
11361136@functools .cache
0 commit comments