[Freeciv-Dev] (PR#2700) SDL_init can only be called once
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
SDL_init() cannot generally be called more than once. Even if you
uninitialize SDL, you can't call it again. And this means SDL sound
doesn't work with the SDL client, since both call SDL_init.
The fix should introduce a common client method of initializing SDL.
Something like init_sdl(options) which will only initialize once. And
SDL should not be uninitted until the client exits (for instance when we
uninitialize a sound module it should not be done, since we may switch
back to that sound module later).
autoconf changes may also be needed to see if any SDL users are being
compiled. The check could be something like
#if defined SDL_AUDIO or defined SDL_CLIENT
or
#ifdef USING_SDL
A patch for this would be welcome.
jason
- [Freeciv-Dev] (PR#2700) SDL_init can only be called once,
Jason Short via RT <=
- Message not available
|
|