Added kernel module for starting the usb stack at boot time. It's not activated thoug...
[cake.git] / rom / intuition / makescreen.c
blobb5b31e2562acfd5ca0decfa82f9f86f1a79ed4ee
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/graphics.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
12 NAME */
13 #include <proto/intuition.h>
15 AROS_LH1(LONG, MakeScreen,
17 /* SYNOPSIS */
18 AROS_LHA(struct Screen *, screen, A0),
20 /* LOCATION */
21 struct IntuitionBase *, IntuitionBase, 63, Intuition)
23 /* FUNCTION
24 Create viewport of the screen.
26 INPUTS
27 Pointer to your custom screen.
29 RESULT
30 Zero for success, non-zero for failure.
32 NOTES
34 EXAMPLE
36 BUGS
38 SEE ALSO
39 RemakeDisplay(), RethinkDisplay(), graphics.library/MakeVPort(),
41 INTERNALS
43 HISTORY
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 LONG failure = TRUE;
50 ULONG ilock = LockIBase(0);
52 if (screen)
54 if ((screen->ViewPort.Modes ^ IntuitionBase->ViewLord.Modes) & LACE)
56 failure = RemakeDisplay();
58 else
60 failure = MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
64 UnlockIBase(ilock);
66 return failure;
68 AROS_LIBFUNC_EXIT
69 } /* MakeScreen */