MAEMO: Fix compilation with older SDL versions

This commit is contained in:
Cameron Cawley 2020-08-02 10:35:47 +01:00
parent b705a5e90e
commit 215c98d321

View File

@ -39,13 +39,19 @@ SdlWindow::SdlWindow()
#endif
{
#if !SDL_VERSION_ATLEAST(2, 0, 0)
#if SDL_VERSION_ATLEAST(2, 0, 0)
#elif SDL_VERSION_ATLEAST(1, 2, 13)
// Query the desktop resolution. We simply hope nothing tried to change
// the resolution so far.
const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo();
if (videoInfo && videoInfo->current_w > 0 && videoInfo->current_h > 0) {
_desktopRes = Common::Rect(videoInfo->current_w, videoInfo->current_h);
}
#elif defined(MAEMO)
// All supported Maemo devices have a display resolution of 800x480
_desktopRes = Common::Rect(800, 480);
#else
#error Unable to detect screen resolution
#endif
}