/* Test der Retina-Karte */
/* Thomas Dorn & Herbert Beilschmidt */

#include <exec/types.h>
#include <exec/libraries.h>

#include <proto/exec.h>

#include <stdio.h>
#include <stdlib.h>
#include "retina/retina.h"
#include "retina/retina_protos.h"
#include "retina/proto/retina_lib.h"

int main(int argc, char **argv);
struct RetinaBase *RetinaBase;

struct RetinaScreen *VDScreen;

int main(int argc, char **argv)
{
    if ( (RetinaBase=(struct RetinaBase *)OpenLibrary("retina.library",0L)) == NULL )
      {
	printf(" Konnte Retina-Library nicht öffnen !!\n");
	exit(100);
      }
    if ( (VDScreen = Retina_OpenScreen(RSCR_MAXWIDTH,RSCR_MAXHEIGHT,MID_DEFAULT_24,RSFF_DONTCLEARONOPEN|RSFF_DONTCLEARONCLOSE,NULL)) == NULL)
      {
	printf(" Konnte Retina-Screen nicht öffnen !!\n");
	CloseLibrary((struct Library *)RetinaBase);
	exit(50);
      }
    Retina_CloseScreen(VDScreen);

    CloseLibrary((struct Library *)RetinaBase);
    printf("Alles sauber aufgeräumt\n");
    exit(0);

}
