typo in debug statement.
[AROS.git] / workbench / demos / rtscreen.c
blob332378c5e1c8e7bd28eeec6b4a3896450b19d2b8
1 #include <libraries/reqtools.h>
2 #include <proto/exec.h>
3 #include <proto/reqtools.h>
5 #include <stdio.h>
6 #include <string.h>
7 #include <stdlib.h>
9 #define PROGNAME "rtscreen"
11 struct ReqToolsBase *ReqToolsBase;
13 static void cleanup(char *msg)
15 if (msg) printf(PROGNAME ": %s\n", msg);
17 if (ReqToolsBase) CloseLibrary((struct Library *)ReqToolsBase);
19 exit(0);
22 static void openlibs(void)
24 ReqToolsBase = (struct ReqToolsBase *)OpenLibrary("reqtools.library", 0);
25 if (!ReqToolsBase) cleanup("Can't open reqtools.library");
28 static void action(void)
30 struct rtScreenModeRequester *req;
32 struct TagItem tags[] =
34 {RTSC_Flags, SCREQF_OVERSCANGAD|SCREQF_AUTOSCROLLGAD|SCREQF_SIZEGADS|SCREQF_DEPTHGAD},
35 {TAG_DONE }
38 if ((req = rtAllocRequestA(RT_SCREENMODEREQ, tags)))
40 rtScreenModeRequestA(req, "Title", tags);
41 rtFreeRequest(req);
45 int main(void)
47 openlibs();
48 action();
49 cleanup(0);
51 return 0;