grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / intuition / makescreen.c
blob9aaa1a08bfbf0bbdf9af48d0e2513d8196af1793
1 /*
2 Copyright © 1995-2013, 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 *****************************************************************************/
45 AROS_LIBFUNC_INIT
47 struct GfxBase *GfxBase = GetPrivIBase(IntuitionBase)->GfxBase;
48 LONG failure = TRUE;
49 ULONG ilock = LockIBase(0);
51 if (screen)
53 if ((screen->ViewPort.Modes ^ IntuitionBase->ViewLord.Modes) & LACE)
55 failure = RemakeDisplay();
57 else
59 failure = MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
63 UnlockIBase(ilock);
65 return failure;
67 AROS_LIBFUNC_EXIT
68 } /* MakeScreen */