[SDL2] Remove delayed loading code.
This commit is contained in:
parent
804384c19c
commit
11d79c6c1c
|
@ -31,24 +31,14 @@ SDLAudioDriver::~SDLAudioDriver() {
|
||||||
};
|
};
|
||||||
|
|
||||||
bool SDLAudioDriver::Initialize() {
|
bool SDLAudioDriver::Initialize() {
|
||||||
// With msvc delayed loading, exceptions are used to determine dll presence.
|
SDL_version ver = {};
|
||||||
#if XE_PLATFORM_WIN32
|
SDL_GetVersion(&ver);
|
||||||
__try {
|
if ((ver.major < 2) || (ver.major == 2 && ver.minor == 0 && ver.patch < 8)) {
|
||||||
#endif // XE_PLATFORM_WIN32
|
XELOGW(
|
||||||
SDL_version ver = {};
|
"SDL library version {}.{}.{} is outdated. "
|
||||||
SDL_GetVersion(&ver);
|
"You may experience choppy audio.",
|
||||||
if ((ver.major < 2) ||
|
ver.major, ver.minor, ver.patch);
|
||||||
(ver.major == 2 && ver.minor == 0 && ver.patch < 8)) {
|
|
||||||
XELOGW(
|
|
||||||
"SDL library version {}.{}.{} is outdated. "
|
|
||||||
"You may experience choppy audio.",
|
|
||||||
ver.major, ver.minor, ver.patch);
|
|
||||||
}
|
|
||||||
#if XE_PLATFORM_WIN32
|
|
||||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
#endif // XE_PLATFORM_WIN32
|
|
||||||
|
|
||||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) {
|
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -398,21 +398,12 @@ bool SDLInputDriver::TestSDLVersion() {
|
||||||
const Uint8 min_patchlevel = 4;
|
const Uint8 min_patchlevel = 4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// With msvc delayed loading, exceptions are used to determine dll presence.
|
SDL_version ver = {};
|
||||||
#if XE_PLATFORM_WIN32
|
SDL_GetVersion(&ver);
|
||||||
__try {
|
if ((ver.major < 2) ||
|
||||||
#endif // XE_PLATFORM_WIN32
|
(ver.major == 2 && ver.minor == 0 && ver.patch < min_patchlevel)) {
|
||||||
SDL_version ver = {};
|
|
||||||
SDL_GetVersion(&ver);
|
|
||||||
if ((ver.major < 2) ||
|
|
||||||
(ver.major == 2 && ver.minor == 0 && ver.patch < min_patchlevel)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#if XE_PLATFORM_WIN32
|
|
||||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif // XE_PLATFORM_WIN32
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue