Restrict CVideo::modePossible to SDL1 only

It's only called from SDL1 functions anyway
This commit is contained in:
Charles Dang 2015-12-24 14:23:32 +11:00
parent c0bf5e51c8
commit 6272190ec5
2 changed files with 3 additions and 10 deletions

View file

@ -556,18 +556,9 @@ int CVideo::bppForMode( int x, int y, int flags)
return 0;
}
#endif
int CVideo::modePossible( int x, int y, int bits_per_pixel, int flags, bool current_screen_optimal )
{
#if SDL_VERSION_ATLEAST(2, 0, 0)
UNUSED(x);
UNUSED(y);
UNUSED(flags);
UNUSED(current_screen_optimal);
return bits_per_pixel;
#else
int bpp = SDL_VideoModeOK( x, y, bits_per_pixel, get_flags(flags) );
if(current_screen_optimal)
{
@ -581,8 +572,8 @@ int CVideo::modePossible( int x, int y, int bits_per_pixel, int flags, bool curr
}
}
return bpp;
#endif
}
#endif
#if SDL_VERSION_ATLEAST(2, 0, 0)

View file

@ -78,8 +78,10 @@ class CVideo : private boost::noncopyable {
const static int DefaultBpp = 32;
#if !SDL_VERSION_ATLEAST(2, 0, 0)
int bppForMode( int x, int y, int flags);
int modePossible( int x, int y, int bits_per_pixel, int flags, bool current_screen_optimal=false);
#endif
int setMode( int x, int y, int bits_per_pixel, int flags );
/**