SDL_RWFromFile is broken

Issue #100 invalid
Tim Schumacher created an issue

SDL_RWFromFile should take an utf-8 string and an ascii string like described here In PySDL2 it takes 2 ascii strings though:

SDL_RWFromFile = _bind("SDL_RWFromFile", [c_char_p, c_char_p], POINTER(SDL_RWops))

This would also make sdlmixer.Mix_LoadWAV work which calls SDL_RWFromFile according to the documentation:

Mix_LoadWAV = lambda fname: Mix_LoadWAV_RW(SDL_RWFromFile(fname, b"rb"), 1)

Comments (2)

  1. Marcus von Appen repo owner

    SDL_RWFromFile takes two C char* pointers, which can contain utf-8 characters. If you pass in an utf-8 (encoded) string, what exactly fails for you?

  2. Log in to comment