Disable code for SDL2 in detect_video_settings.

This part of the code probably needs to be rewritten for SDL2, so add a
small band-aid for now.
This commit is contained in:
Mark de Wever 2014-03-02 13:46:30 +01:00
parent e2e029b6e0
commit a5ebded0cb

View file

@ -68,10 +68,13 @@ bool detect_video_settings(CVideo& video, std::pair<int,int>& resolution, int& b
resolution = preferences::resolution();
int DefaultBPP = 24;
#if !SDL_VERSION_ATLEAST(2, 0, 0)
/* This needs to be fixed properly. */
const SDL_VideoInfo* const video_info = SDL_GetVideoInfo();
if(video_info != NULL && video_info->vfmt != NULL) {
DefaultBPP = video_info->vfmt->BitsPerPixel;
}
#endif
std::cerr << "Checking video mode: " << resolution.first << 'x'
<< resolution.second << 'x' << DefaultBPP << "...\n";