Extended list of display resolutions

This commit is contained in:
alexey.lysiuk 2014-10-18 14:55:27 +03:00
parent 949325df68
commit b2110db1f5

View file

@ -1541,36 +1541,52 @@ SDL_Rect** SDL_ListModes(SDL_PixelFormat* format, Uint32 flags)
ZD_UNUSED(format);
ZD_UNUSED(flags);
static std::vector< SDL_Rect* > resolutions;
static std::vector<SDL_Rect*> resolutions;
if (resolutions.empty())
{
#define DEFINE_RESOLUTION(WIDTH, HEIGHT) \
#define DEFINE_RESOLUTION(WIDTH, HEIGHT) \
static SDL_Rect resolution_##WIDTH##_##HEIGHT = { 0, 0, WIDTH, HEIGHT }; \
resolutions.push_back(&resolution_##WIDTH##_##HEIGHT);
DEFINE_RESOLUTION(640, 480);
DEFINE_RESOLUTION(720, 480);
DEFINE_RESOLUTION(800, 600);
DEFINE_RESOLUTION( 640, 480);
DEFINE_RESOLUTION( 720, 480);
DEFINE_RESOLUTION( 800, 480);
DEFINE_RESOLUTION( 800, 600);
DEFINE_RESOLUTION(1024, 600);
DEFINE_RESOLUTION(1024, 640);
DEFINE_RESOLUTION(1024, 768);
DEFINE_RESOLUTION(1152, 720);
DEFINE_RESOLUTION(1152, 864);
DEFINE_RESOLUTION(1280, 720);
DEFINE_RESOLUTION(1280, 768);
DEFINE_RESOLUTION(1280, 800);
DEFINE_RESOLUTION(1280, 854);
DEFINE_RESOLUTION(1280, 960);
DEFINE_RESOLUTION(1280, 1024);
DEFINE_RESOLUTION(1366, 768);
DEFINE_RESOLUTION(1400, 1050);
DEFINE_RESOLUTION(1440, 900);
DEFINE_RESOLUTION(1440, 960);
DEFINE_RESOLUTION(1440, 1080);
DEFINE_RESOLUTION(1600, 900);
DEFINE_RESOLUTION(1600, 1200);
DEFINE_RESOLUTION(1680, 1050);
DEFINE_RESOLUTION(1920, 1080);
DEFINE_RESOLUTION(1920, 1200);
DEFINE_RESOLUTION(2048, 1080);
DEFINE_RESOLUTION(2048, 1536);
DEFINE_RESOLUTION(2560, 1080);
DEFINE_RESOLUTION(2560, 1440);
DEFINE_RESOLUTION(2560, 1600);
DEFINE_RESOLUTION(2560, 2048);
DEFINE_RESOLUTION(2880, 1800);
DEFINE_RESOLUTION(3200, 1800);
DEFINE_RESOLUTION(3440, 1440);
DEFINE_RESOLUTION(3840, 2160);
DEFINE_RESOLUTION(3840, 2400);
DEFINE_RESOLUTION(4096, 2160);
DEFINE_RESOLUTION(5120, 2880);
#undef DEFINE_RESOLUTION