Skip to content

Commit 523649f

Browse files
committed
Write SDL_MIXER_VERSION_ATLEAST macro
1 parent f51f432 commit 523649f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SDL3_mixer-CS/SDL3_mixer/SDL_mixer.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@ public static unsafe partial class SDL3_mixer
99
{
1010
[Constant]
1111
public static readonly SDL_AudioFormat MIX_DEFAULT_FORMAT = SDL_AUDIO_S16;
12+
13+
[Macro]
14+
public static bool SDL_MIXER_VERSION_ATLEAST(int X, int Y, int Z) =>
15+
((SDL_MIXER_MAJOR_VERSION >= X) &&
16+
(SDL_MIXER_MAJOR_VERSION > X || SDL_MIXER_MINOR_VERSION >= Y) &&
17+
(SDL_MIXER_MAJOR_VERSION > X || SDL_MIXER_MINOR_VERSION > Y || SDL_MIXER_MICRO_VERSION >= Z));
1218
}
1319
}

0 commit comments

Comments
 (0)