revert between 56095 -> 55830 in arch
[AROS.git] / rom / intuition / remakedisplay.c
blob955bbcb96a50ac075b99061dd9dd7c8739a5952b
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_LH0(LONG, RemakeDisplay,
17 /* SYNOPSIS */
19 /* LOCATION */
20 struct IntuitionBase *, IntuitionBase, 64, Intuition)
22 /* FUNCTION
23 Remake the entire Intuition display.
25 INPUTS
26 None.
28 RESULT
29 Zero for success, non-zero for failure.
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
38 RethinkDisplay(), MakeScreen(), graphics.library/MakeVPort(),
39 graphics.library/MrgCop(), graphics.library/LoadView()
41 INTERNALS
43 *****************************************************************************/
45 AROS_LIBFUNC_INIT
47 struct GfxBase *GfxBase = GetPrivIBase(IntuitionBase)->GfxBase;
48 struct Screen *screen;
49 ULONG ilock = LockIBase(0);
50 LONG failure = 0;
52 for (screen = IntuitionBase->FirstScreen; screen; screen = screen->NextScreen)
54 LONG error = MakeVPort(&IntuitionBase->ViewLord, &screen->ViewPort);
56 if (error)
57 failure = error;
60 if (!failure)
61 failure = RethinkDisplay();
63 UnlockIBase(ilock);
65 return failure;
67 AROS_LIBFUNC_EXIT
68 } /* RemakeDisplay */