RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.28k stars 266 forks source link

cute_sound: Add CUTE_SOUND_PLATFORM_* Defines #354

Closed RobLoach closed 1 year ago

RobLoach commented 1 year ago

This change introduces three possible defines:

CUTE_SOUND_PLATFORM_WINDOWS
CUTE_SOUND_PLATFORM_APPLE
CUTE_SOUND_PLATFORM_SDL

This allows easily selecting the platform from your compiler definitions. Rather than specifying something like...

-DCUTE_SOUND_PLATFORM=2

... and having to figure out what "2" means, you can use...

-DCUTE_SOUND_PLATFORM_APPLE

The automatic platform detection is still in place, this just makes it easier to define within your compiler definitions. This is similar to CUTE_SOUND_FORCE_SDL, but can be applied to all platforms.