Minor fixes to comments.
[AROS.git] / rom / intuition / makescreen.c
blobc180470f24e5d136a82b3833e003b5cbd854b615
1 /*
2 Copyright © 1995-2011, 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 struct GfxBase *GfxBase = GetPrivIBase(IntuitionBase)->GfxBase;
50 LONG failure = TRUE;
51 ULONG ilock = LockIBase(0);
53 if (screen)
55 if ((screen->ViewPort.Modes ^ IntuitionBase->ViewLord.Modes) & LACE)
57 failure = RemakeDisplay();
59 else
61 failure = MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
65 UnlockIBase(ilock);
67 return failure;
69 AROS_LIBFUNC_EXIT
70 } /* MakeScreen */