Backward compatibility for mixer version check (#46)

SDL_MIXER_VERSION_ATLEAST isn't available in SDL Mixer 2.0.1, which will cause build errors.
This commit is contained in:
Mariotaku 2021-10-17 15:00:49 +09:00 committed by GitHub
parent b7bf1563e5
commit 787c623cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,9 @@
#include "pch.h" #include "pch.h"
#include "Sound.h" #include "Sound.h"
#ifndef SDL_MIXER_VERSION_ATLEAST
#define SDL_MIXER_VERSION_ATLEAST(X, Y, Z) (SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
#endif
int Sound::num_channels; int Sound::num_channels;
bool Sound::enabled_flag = false; bool Sound::enabled_flag = false;