Skip to content
Permalink
Browse files

Change #6173: Update SDL driver to use SDL 2.0

  • Loading branch information
nikolas committed Jan 18, 2019
1 parent fa53abe commit c3493e4e3fde7457afa9da4c204f0dd0d706090e
Showing with 234 additions and 168 deletions.
  1. +1 −1 config.lib
  2. +6 −3 src/crashlog.cpp
  3. +1 −1 src/sdl.cpp
  4. +226 −162 src/video/sdl_v.cpp
  5. +0 −1 src/video/sdl_v.h
@@ -2500,7 +2500,7 @@ detect_sdl() {
sleep 5
fi

detect_pkg_config "$with_sdl" "sdl" "sdl_config" "1.2"
detect_pkg_config "$with_sdl" "sdl2" "sdl_config" "2.0"
}

detect_osx_sdk() {
@@ -269,12 +269,15 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const

#ifdef WITH_SDL
#ifdef DYNAMICALLY_LOADED_SDL
if (SDL_CALL SDL_Linked_Version != NULL) {
SDL_version linked;
SDL_CALL SDL_GetVersion(&linked);
if (linked != NULL) {
#else
{
#endif
const SDL_version *v = SDL_CALL SDL_Linked_Version();
buffer += seprintf(buffer, last, " SDL: %d.%d.%d\n", v->major, v->minor, v->patch);
SDL_version v;
SDL_CALL SDL_GetVersion(&v);
buffer += seprintf(buffer, last, " SDL: %d.%d.%d\n", v.major, v.minor, v.patch);
}
#endif /* WITH_SDL */

@@ -94,7 +94,7 @@ const char *SdlOpen(uint32 x)
}
#endif
if (_sdl_usage++ == 0) {
if (SDL_CALL SDL_Init(x | SDL_INIT_NOPARACHUTE) == -1) return SDL_CALL SDL_GetError();
if (SDL_CALL SDL_Init(x) == -1) return SDL_CALL SDL_GetError();
} else if (x != 0) {
if (SDL_CALL SDL_InitSubSystem(x) == -1) return SDL_CALL SDL_GetError();
}

0 comments on commit c3493e4

Please sign in to comment.
You can’t perform that action at this time.