Skip to content

SDL_GetAudioDeviceName() returns a strdup'd pointer, nothing else does. #9902

@icculus

Description

@icculus

Everything else (SDL_GetJoystickName, etc) is returning a const char * that SDL owns, so the audio device function needs to change to match.

Also, the SDL_Get*Name() functions should all probably have documentation that says "this pointer is valid at least until the next call to SDL_PumpEvents and is definitely deallocated during SDL_Quit()." And have some functionality that hooks the already-allocated string to the SDL_AllocateEventMemory list for freeing, once SDL is done with it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions