renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
325 stars 63 forks source link

pygame_sdl2.controller.get_axis_from_string crashes when provided with a string. #141

Closed ijffdrie closed 1 year ago

ijffdrie commented 2 years ago

When the function pygame_sdl2.controller.get_axis_from_string was called from a .py file containing custom displayable for a ren'py project (version 8.0.1), it experienced a type error due to the argument passed being a string ('rightx'). Given the name of the function, this seems like a bug on its face.

File "pink_engine/orthogonal_tiled_map.py", line 6233, in go_to_map File "pink_engine/orthogonal_tiled_map.py", line 4341, in check_held_keys File "pink_engine/orthogonal_tiled_map.py", line 4496, in check_held_direction File "src/pygame_sdl2/controller.pyx", line 97, in pygame_sdl2.controller.get_axis_from_string TypeError: expected bytes, str found

This error did not occur prior to updating. Previous version of ren'py on the project was 7.4.0.