Fixed missing fprintf argument.
[AROS.git] / rom / hyperlayers / layers_init.c
blob1bf5a7583d3153103b0365bde4da6d81d58b3eab
1 /*
2 Copyright © 1995-2004, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Layers Resident and initialization.
6 Lang: english
7 */
9 #include "layers_intern.h"
10 #include LC_LIBDEFS_FILE
11 #include <graphics/gfxbase.h>
12 #include <proto/exec.h>
13 #include <aros/symbolsets.h>
15 #undef GfxBase
16 #undef UtilityBase
18 #define SysBase LIBBASE->lb_SysBase
20 AROS_SET_LIBFUNC(LayersInit, LIBBASETYPE, LIBBASE)
22 AROS_SET_LIBFUNC_INIT
24 InitSemaphore(&LIBBASE->lb_MemLock);
26 LIBBASE->lb_ClipRectPool = CreatePool(MEMF_CLEAR | MEMF_PUBLIC, sizeof(struct ClipRect) * 50, sizeof(struct ClipRect) * 50);
27 LIBBASE->lb_GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",0);
28 LIBBASE->lb_UtilityBase = (struct UtilityBase *) OpenLibrary("utility.library",0);
30 if (!LIBBASE->lb_GfxBase || !LIBBASE->lb_UtilityBase || !LIBBASE->lb_ClipRectPool)
32 if (LIBBASE->lb_GfxBase)
34 CloseLibrary((struct Library *)LIBBASE->lb_GfxBase);
35 LIBBASE->lb_GfxBase = NULL;
37 if (LIBBASE->lb_UtilityBase)
39 CloseLibrary((struct Library *)LIBBASE->lb_UtilityBase);
40 LIBBASE->lb_UtilityBase = NULL;
42 if (LIBBASE->lb_ClipRectPool)
44 DeletePool(LIBBASE->lb_ClipRectPool);
45 LIBBASE->lb_ClipRectPool = NULL;
47 return FALSE;
50 return TRUE;
51 AROS_SET_LIBFUNC_EXIT
54 ADD2INITLIB(LayersInit, 0);