2 Copyright © 1995-2010, 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"
16 /*****************************************************************************
19 #include <proto/graphics.h>
21 AROS_LH1(DisplayInfoHandle
, FindDisplayInfo
,
24 AROS_LHA(ULONG
, ID
, D0
),
27 struct GfxBase
*, GfxBase
, 121, Graphics
)
30 Search for a DisplayInfo which matches the ID key.
36 handle - handle to a displayinfo record with that key
46 graphics/displayinfo.h
53 ******************************************************************************/
57 struct monitor_driverdata
*mdd
;
58 struct DisplayInfoHandle
*ret
= NULL
;
59 HIDDT_ModeID hiddmode
;
61 D(bug("FindDisplayInfo(id=%x)\n", ID
));
63 /* The database may fail on INVALID_ID, so handle this explicitly */
67 /* Find display driver data */
68 for (mdd
= CDD(GfxBase
)->monitors
; mdd
; mdd
= mdd
->next
) {
69 if (mdd
->id
== (ID
& mdd
->mask
))
75 /* Calculate HIDD part of ModeID */
76 hiddmode
= ID
& (~mdd
->mask
);
78 /* Go through all mode records of this driver */
79 for (ret
= mdd
->modes
; ret
->id
!= vHidd_ModeID_Invalid
; ret
++) {
80 if (ret
->id
== hiddmode
)
87 } /* FindDisplayInfo */