mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 12:18:28 +00:00
Don't export SDL_AudioInit/Quit, use SDL_InitSubsystem instead (#6912)
* Don't export SDL_AudioInit/Quit, use SDL_InitSubsystem instead * Update README Co-authored-by: Sam Lantinga <slouken@libsdl.org>
This commit is contained in:
parent
3fb0c8b54a
commit
47170d288e
10 changed files with 51 additions and 65 deletions
|
@ -1346,7 +1346,8 @@ SDLTest_CommonInit(SDLTest_CommonState *state)
|
|||
SDL_Log("%s\n", text);
|
||||
}
|
||||
}
|
||||
if (SDL_AudioInit(state->audiodriver) < 0) {
|
||||
SDL_SetHint("SDL_AUDIO_DRIVER", state->audiodriver);
|
||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) {
|
||||
SDL_Log("Couldn't initialize audio driver: %s\n",
|
||||
SDL_GetError());
|
||||
return SDL_FALSE;
|
||||
|
@ -2163,7 +2164,7 @@ void SDLTest_CommonQuit(SDLTest_CommonState *state)
|
|||
SDL_VideoQuit();
|
||||
}
|
||||
if (state->flags & SDL_INIT_AUDIO) {
|
||||
SDL_AudioQuit();
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
}
|
||||
SDL_free(state);
|
||||
SDL_Quit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue