| N F O _ F I N D G F X E N T R Y ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English
AMIGA - NFO_#?
----------------------------------------------------------------------------
NAME
nfo_findgfxentry() - Allows to find either modeid or
resolution in the mon. database.
SYNOPSIS
modeid = nfo_findgfxentry(query, defdepth);
ULONG nfo_findgfxentry(UBYTE *, ULONG *);
FUNCTION
This function is a textual interface to three modeid
rel. funcs: 'nfo_findgfxrange()', 'nfo_findgfxreso()'
and 'nfo_findgfxsm()' that allows to find modeid in
the monitor database in a comfortable way.
INPUTS
query - NULL terminated string containing at least
one textual argument in one of four numeral
systems.
defdepth - New default depth to use when not specified
in the 'query'. This argument must be a ptr
to the integer. The very first 2 bytes must
contain the default depth and the other two
will contain users choice after this func.
is complete. NULL can be specified so that
the default depth will be switched to 2bits
when looking for screenmode.
RETURNS
Returns modeid or INVALID_ID.
BASES
SysBase, GfxBase, IntuitionBase, (MathIeeeXXXXBasBase)
NOTES
See source code for the default bit depth value.
The template for 'query' is: "<[modeid] | [XxY[xD]]>
[[rlow] [rhigh] | [monname]] [flag] [flag] [...]",
where the very first argument must be either modeid
or resolution. Second argument can be range or mon.
name or flag, and the rest of the line can be flags.
AmigaOS patterns can be used in '[monname]', but be
careful as it may cause ranges to be unreliable!
The flags are defined in 'graphics/displayinfo.h' in
OS includes. Please note that you only pass literals
after 'DIPF_IS_'. For example, having 'DIPF_IS_LACE'
you just pass 'lace'.
There are two very special flags, see the autodocs
on 'nfo_findgfxreso()'.
There is at least one property flag that may cause
monitor name not to be recogized, its PAL. The cure
for that is to type 'P?L' or 'PAL#?' if you mean the
monitor.
There is a very special monitor available called
"ACTIVE" that translates to current monitor.
The most safe setup is '640x400x4 cofact similar' as
this is guaraneed to be found on OCS/ECS/AGA/CGX/P96
independently of PAL or NTSC system.
SEE ALSO
nfo_findgfxreso(), nfo_findgfxsm(),
nfo_findgfxrange()
EXAMPLE
...
ULONG modeid;
/*
* Find this or lower resolution anywhere with the
* default bit depth.
*/
if (modeid = nfo_findgfxentry(
"640x480 similar", NULL) !=
INVALID_ID)
{
...
}
/*
* Try to find this resolution in gfx boards only
* using range.
*/
if (modeid = nfo_findgfxentry(
"640x480x7 0xAFFFF 0xFFFFFFFF", NULL) !=
INVALID_ID)
{
...
}
/*
* Try to find this modeid.
*/
if (modeid = nfo_findgfxentry(
"0x99004", NULL) !=
INVALID_ID)
{
...
}
BUGS
None known.
----------------------------------------------------------------------------
| |
| |