view test/testver.c @ 5133:ec13e48ee0d9

Fixed bug #1112 (retina display support) Vittorio Giovara 2011-02-01 02:21:50 PST with the attached patch, the opengles context will always use the maximum screensize available; this is particularly useful for supporting retina display on latest iphone. please note: Apple documentation warns that using the "upscaled" gl context actually uses more memory and bandwitdh, so it might be worth to let the user decide whether to disable it or not, either with a flag or a sdl function...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 01 Feb 2011 08:54:34 -0800
parents 5e7e1f1a4056
children
line wrap: on
line source


/* Test program to compare the compile-time version of SDL with the linked
   version of SDL
*/

#include <stdio.h>
#include <stdlib.h>

#include "SDL.h"

int
main(int argc, char *argv[])
{
    SDL_version compiled;
    SDL_version linked;

#if SDL_VERSION_ATLEAST(1, 3, 0)
    printf("Compiled with SDL 1.3 or newer\n");
#else
    printf("Compiled with SDL older than 1.3\n");
#endif
    SDL_VERSION(&compiled);
    printf("Compiled version: %d.%d.%d (%s)\n",
           compiled.major, compiled.minor, compiled.patch, SDL_REVISION);
    SDL_GetVersion(&linked);
    printf("Linked version: %d.%d.%d (%s)\n",
           linked.major, linked.minor, linked.patch, SDL_GetRevision());
    SDL_Quit();
    return (0);
}