2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function FindDisplayInfo()
8 #include <aros/debug.h>
9 #include <proto/graphics.h>
10 #include <graphics/displayinfo.h>
11 #include <hidd/graphics.h>
13 #include "graphics_intern.h"
15 /*****************************************************************************
18 #include <proto/graphics.h>
20 AROS_LH1(DisplayInfoHandle
, FindDisplayInfo
,
23 AROS_LHA(ULONG
, ID
, D0
),
26 struct GfxBase
*, GfxBase
, 121, Graphics
)
34 handle - handle to a displayinfo record with that key
44 graphics/displayinfo.h
51 ******************************************************************************/
54 AROS_LIBBASE_EXT_DECL(struct GfxBase
*,GfxBase
)
56 DisplayInfoHandle ret
= NULL
;
57 HIDDT_ModeID hiddmode
;
58 OOP_Object
*sync
, *pixfmt
;
60 D(bug("FindDisplayInfo(id=%x)\n", ID
));
62 /* Check for the NOTNULLMASK */
63 if ((ID
& NOTNULLMASK
) != NOTNULLMASK
) {
64 D(bug("!!! NO AROS MODEID IN FindDisplayInfo() !!!\n"));
68 hiddmode
= AMIGA_TO_HIDD_MODEID(ID
);
70 /* Try to get mode info for the mode */
71 if (!HIDD_Gfx_GetMode(SDD(GfxBase
)->gfxhidd
, hiddmode
, &sync
, &pixfmt
)) {
72 D(bug("!!! NO AROS MODEID IN FindDisplayInfo() !!!\n"));
76 ret
= (DisplayInfoHandle
)ID
;
81 } /* FindDisplayInfo */