renpy / pygame_sdl2

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

Fix webaudio broken by RWops PR #144

Closed Tey closed 1 year ago

Tey commented 1 year ago

Since https://github.com/renpy/renpy/pull/3423 has been merged, webaudio.play() is broken as the file argument is now a RWops object with no way to retrieve the location of the underlying resource file. This PR simply adds a name attribute to RWops to store the file location to match the definition of io.FileIO (which is what webaudio expects).

Setting this attribute only from RWops_from_file() seems to fix the issue, but maybe it should be set in other locations where a RWops object is created as well.